From f91b05b3093233b3bf1234cdfd4a4a807cc0b87c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E9=87=91=E5=8B=87?= Date: Thu, 20 Apr 2023 03:44:43 +0000 Subject: [PATCH] * Fix bug#34444. --- db/update18.3.sql | 9 +++++++++ db/zentao.sql | 14 +++++++------- module/bug/control.php | 2 +- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/db/update18.3.sql b/db/update18.3.sql index e1cc11993c..b1434995b0 100644 --- a/db/update18.3.sql +++ b/db/update18.3.sql @@ -461,8 +461,17 @@ CHANGE `repo` `repo` mediumint unsigned NOT NULL DEFAULT '0', CHANGE `mr` `mr` mediumint unsigned NOT NULL DEFAULT '0', CHANGE `entry` `entry` text NULL, CHANGE `lines` `lines` varchar(10) NOT NULL DEFAULT '', +CHANGE `feedbackBy` `feedbackBy` varchar(100) NOT NULL DEFAULT '', +CHANGE `notifyEmail` `notifyEmail` varchar(100) NOT NULL DEFAULT '', CHANGE `v1` `v1` varchar(40) NOT NULL DEFAULT '', CHANGE `v2` `v2` varchar(40) NOT NULL DEFAULT '', + +CHANGE `duplicateBug` `duplicateBug` mediumint unsigned NOT NULL DEFAULT '0', +CHANGE `linkBug` `linkBug` varchar(255) NOT NULL DEFAULT '', +CHANGE `case` `case` mediumint unsigned NOT NULL DEFAULT '0', +CHANGE `result` `result` mediumint unsigned NOT NULL DEFAULT '0', +CHANGE `testtask` `testtask` mediumint unsigned NOT NULL DEFAULT '0', + CHANGE `identify` `identify` mediumint unsigned NOT NULL DEFAULT '0', CHANGE `deadline` `deadline` date NULL, CHANGE `activatedCount` `activatedCount` smallint NOT NULL DEFAULT '0', diff --git a/db/zentao.sql b/db/zentao.sql index 4994fb0e1a..29719a2eb9 100755 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -276,8 +276,8 @@ CREATE TABLE IF NOT EXISTS `zt_bug` ( `confirmed` tinyint(1) NOT NULL DEFAULT '0', `activatedCount` smallint(6) NOT NULL DEFAULT '0', `activatedDate` datetime NULL, - `feedbackBy` varchar(100) NOT NULL, - `notifyEmail` varchar(100) NOT NULL, + `feedbackBy` varchar(100) NOT NULL DEFAULT '', + `notifyEmail` varchar(100) NOT NULL DEFAULT '', `mailto` text, `openedBy` varchar(30) NOT NULL DEFAULT '', `openedDate` datetime NOT NULL, @@ -291,12 +291,12 @@ CREATE TABLE IF NOT EXISTS `zt_bug` ( `resolvedDate` datetime NULL, `closedBy` varchar(30) NOT NULL DEFAULT '', `closedDate` datetime NULL, - `duplicateBug` mediumint(8) unsigned NOT NULL, - `linkBug` varchar(255) NOT NULL, - `case` mediumint(8) unsigned NOT NULL, + `duplicateBug` mediumint(8) unsigned NOT NULL DEFAULT '0', + `linkBug` varchar(255) NOT NULL DEFAULT '', + `case` mediumint(8) unsigned NOT NULL DEFAULT '0', `caseVersion` smallint(6) NOT NULL DEFAULT '1', `feedback` mediumint(8) unsigned NOT NULL DEFAULT '0', - `result` mediumint(8) unsigned NOT NULL, + `result` mediumint(8) unsigned NOT NULL DEFAULT '0', `repo` mediumint(8) unsigned NOT NULL DEFAULT '0', `mr` mediumint(8) unsigned NOT NULL DEFAULT '0', `entry` text NULL, @@ -305,7 +305,7 @@ CREATE TABLE IF NOT EXISTS `zt_bug` ( `v2` varchar(40) NOT NULL DEFAULT '', `repoType` varchar(30) NOT NULL DEFAULT '', `issueKey` varchar(50) NOT NULL DEFAULT '', - `testtask` mediumint(8) unsigned NOT NULL, + `testtask` mediumint(8) unsigned NOT NULL DEFAULT '0', `lastEditedBy` varchar(30) NOT NULL DEFAULT '', `lastEditedDate` datetime NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', diff --git a/module/bug/control.php b/module/bug/control.php index 3d95247bff..19af541ec4 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -857,7 +857,7 @@ class bug extends control $this->view->stories = $stories; $this->view->builds = $builds; $this->view->users = $this->user->getPairs('devfirst|noclosed'); - $this->view->projects = array('' => '') + $this->product->getProjectPairsByProduct($productID, $branch ? "0,$branch" : 0, 'id_desc', $projectID); + $this->view->projects = array('' => '') + $this->product->getProjectPairsByProduct($productID, $branch ? "0,$branch" : 0); $this->view->projectID = $projectID; $this->view->executions = array('' => '') + $this->product->getExecutionPairsByProduct($productID, $branch ? "0,$branch" : 0, 'id_desc', $projectID, 'multiple,stagefilter'); $this->view->executionID = $executionID;