From a3bc8b32f19586cf8230b9b9cb97fc41e61e55e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E9=87=91=E5=8B=87?= Date: Tue, 18 Apr 2023 08:36:52 +0000 Subject: [PATCH] * Fix bug#34105. --- db/update18.3.sql | 1 + db/zentao.sql | 2 +- module/release/control.php | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/db/update18.3.sql b/db/update18.3.sql index 683eacac4e..112a708815 100644 --- a/db/update18.3.sql +++ b/db/update18.3.sql @@ -604,6 +604,7 @@ ALTER TABLE `zt_kanbanlane` CHANGE `lastEditedTime` `lastEditedTime` datetime NULL; ALTER TABLE `zt_kanbanregion` +CHANGE `space` `space` mediumint unsigned NOT NULL DEFAULT '0'; CHANGE `lastEditedBy` `lastEditedBy` char(30) NOT NULL DEFAULT '', CHANGE `lastEditedDate` `lastEditedDate` datetime NULL; diff --git a/db/zentao.sql b/db/zentao.sql index aa60142d7e..3ea8a5bb48 100755 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -964,7 +964,7 @@ CREATE TABLE IF NOT EXISTS `zt_kanban` ( -- DROP TABLE IF EXISTS `zt_kanbanregion`; CREATE TABLE IF NOT EXISTS `zt_kanbanregion` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, - `space` mediumint(8) unsigned NOT NULL, + `space` mediumint(8) unsigned NOT NULL DEFAULT '0', `kanban` mediumint(8) unsigned NOT NULL, `name` varchar(255) NOT NULL, `order` mediumint(8) NOT NULL DEFAULT '0', diff --git a/module/release/control.php b/module/release/control.php index 47bdd41c2e..edc2bbe131 100644 --- a/module/release/control.php +++ b/module/release/control.php @@ -224,8 +224,8 @@ class release extends control $leftBugPager = new pager($type == 'leftBug' ? $recTotal : 0, $recPerPage, $type == 'leftBug' ? $pageID : 1); $leftBugs = $this->dao->select("*, IF(`severity` = 0, {$this->config->maxPriValue}, `severity`) as severityOrder")->from(TABLE_BUG) - ->where('id')->in($release->leftBugs) - ->andWhere('deleted')->eq(0) + ->where('deleted')->eq(0) + ->beginIF($release->leftBugs)->andWhere('id')->in($release->leftBugs)->fi() ->beginIF($type == 'leftBug')->orderBy($sort)->fi() ->page($leftBugPager) ->fetchAll();