From 78888f1f81e8743da5c1b490242ab22b3659a65f Mon Sep 17 00:00:00 2001 From: chenfei Date: Mon, 20 Jul 2020 15:46:49 +0800 Subject: [PATCH 1/7] * Adjust order in roadmap. --- module/product/model.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/product/model.php b/module/product/model.php index c0138a90ae..d22b3f350f 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -698,6 +698,7 @@ class productModel extends model krsort($orderedPlans); foreach($orderedPlans as $plans) { + krsort($plans); foreach($plans as $plan) { if($plan->parent > 0 and isset($parents[$plan->parent])) $plan->title = $parents[$plan->parent] . ' / ' . $plan->title; @@ -716,6 +717,7 @@ class productModel extends model krsort($orderedReleases); foreach($orderedReleases as $releases) { + krsort($releases); foreach($releases as $release) { $year = substr($release->date, 0, 4); From e4059ed259b83d36de0a6b2424497319bc9aa434 Mon Sep 17 00:00:00 2001 From: sgm0422 <976204163@qq.com> Date: Mon, 20 Jul 2020 17:14:48 +0800 Subject: [PATCH 2/7] * Fix sql. --- db/standard/zentao12.3.3.sql | 1 - db/update12.3.2.sql | 2 -- db/zentao.sql | 1 - 3 files changed, 4 deletions(-) diff --git a/db/standard/zentao12.3.3.sql b/db/standard/zentao12.3.3.sql index 8462ee6bf1..9462655075 100644 --- a/db/standard/zentao12.3.3.sql +++ b/db/standard/zentao12.3.3.sql @@ -388,7 +388,6 @@ CREATE TABLE `zt_file` ( ) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE `zt_group` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, - `program` mediumint(8) unsigned NOT NULL DEFAULT 0, `name` char(30) NOT NULL, `role` char(30) NOT NULL DEFAULT '', `desc` char(255) NOT NULL DEFAULT '', diff --git a/db/update12.3.2.sql b/db/update12.3.2.sql index fb85878bf0..4520f6e483 100644 --- a/db/update12.3.2.sql +++ b/db/update12.3.2.sql @@ -4,5 +4,3 @@ DELETE FROM `zt_grouppriv` WHERE `module` = 'api' AND `method` = 'getModel'; DELETE FROM `zt_grouppriv` WHERE `module` = 'api' AND `method` = 'sql'; ALTER TABLE `zt_jenkins` CHANGE `password` `password` varchar(255) COLLATE 'utf8_general_ci' NOT NULL AFTER `account`; - -ALTER TABLE `zt_group` ADD `program` mediumint(8) unsigned NOT NULL DEFAULT 0 AFTER `id`; diff --git a/db/zentao.sql b/db/zentao.sql index 99813574bf..f56f51a8b0 100644 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -403,7 +403,6 @@ CREATE TABLE IF NOT EXISTS `zt_file` ( -- DROP TABLE IF EXISTS `zt_group`; CREATE TABLE IF NOT EXISTS `zt_group` ( `id` mediumint(8) unsigned NOT NULL auto_increment, - `program` mediumint(8) unsigned NOT NULL DEFAULT 0, `name` char(30) NOT NULL, `role` char(30) NOT NULL default '', `desc` char(255) NOT NULL default '', From bf7fc5a53bee21a9f8840c49184b7e3f4582953c Mon Sep 17 00:00:00 2001 From: leiyong <1549684884@qq.com> Date: Mon, 20 Jul 2020 17:20:29 -0700 Subject: [PATCH 3/7] * Finish task#7350. --- module/story/lang/zh-cn.php | 1 + module/story/model.php | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/module/story/lang/zh-cn.php b/module/story/lang/zh-cn.php index 12e53e603a..655f0ca508 100644 --- a/module/story/lang/zh-cn.php +++ b/module/story/lang/zh-cn.php @@ -58,6 +58,7 @@ $lang->story->batchChangeStage = "批量修改阶段"; $lang->story->batchAssignTo = "批量指派"; $lang->story->batchChangeModule = "批量修改模块"; $lang->story->viewAll = '查看全部'; +$lang->story->parentClose = '需求:%s 为父需求,将不会被关闭。'; $lang->story->common = $lang->storyCommon; $lang->story->id = '编号'; diff --git a/module/story/model.php b/module/story/model.php index 54e8bc5baa..bf0e1ec90f 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -1134,10 +1134,12 @@ class storyModel extends model $data = fixer::input('post')->get(); $storyIdList = $data->storyIdList ? $data->storyIdList : array(); - $oldStories = $this->getByList($storyIdList); + $oldStories = $this->getByList($storyIdList); + $parentIdList = array(); foreach($storyIdList as $storyID) { $oldStory = $oldStories[$storyID]; + if($oldStory->parent == -1) $parentIdList[] = $oldStory->id; if($oldStory->status == 'closed') continue; $story = new stdclass(); @@ -1160,6 +1162,12 @@ class storyModel extends model unset($story); } + if(count($parentIdList)) + { + $noticeParentID = implode(',', $parentIdList); + die(js::alert(sprintf($this->lang->story->parentClose, $noticeParentID))); + } + foreach($stories as $storyID => $story) { if(!$story->closedReason) continue; From ee2165bf0675b6826af81ac7d9d2dc2db9de88f6 Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Tue, 21 Jul 2020 10:08:56 +0800 Subject: [PATCH 4/7] * Finish task #7459. --- module/search/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/search/model.php b/module/search/model.php index 19c558fbf9..e9805a7ca8 100644 --- a/module/search/model.php +++ b/module/search/model.php @@ -106,8 +106,8 @@ class searchModel extends model /* Skip empty values. */ if($this->post->$valueName == false) continue; - if($this->post->$valueName == 'null') $this->post->$valueName = ''; // Null is special, stands to empty. if($this->post->$valueName == 'ZERO') $this->post->$valueName = 0; // ZERO is special, stands to 0. + if(isset($fieldParams->$field) and $fieldParams->$field->control == 'select' and $this->post->$valueName == 'null') $this->post->$valueName = ''; // Null is special, stands to empty if control is select. Fix bug #3279. $scoreNum += 1; From 192abdb3482e073043e08328ac7e214d6e24f761 Mon Sep 17 00:00:00 2001 From: leiyong <1549684884@qq.com> Date: Mon, 20 Jul 2020 22:50:26 -0700 Subject: [PATCH 5/7] * Adjust code. --- module/story/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/story/model.php b/module/story/model.php index bf0e1ec90f..715a3102d0 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -1438,8 +1438,8 @@ class storyModel extends model $story = $this->dao->findById($storyID)->from(TABLE_STORY)->fetch(); - if($story->status == 'closed') return $this->dao->update(TABLE_STORY)->set('stage')->eq('closed')->where('id')->eq($storyID)->exec(); if(!empty($story->stagedBy)) return false; + if($story->status == 'closed') $this->dao->update(TABLE_STORY)->set('stage')->eq('closed')->where('id')->eq($storyID)->exec(); $product = $this->dao->findById($story->product)->from(TABLE_PRODUCT)->fetch(); $projects = $this->dao->select('t1.project,t3.branch')->from(TABLE_PROJECTSTORY)->alias('t1') From 6e08756f0b26d4948c938d3a91394f2dab5abcb7 Mon Sep 17 00:00:00 2001 From: reneeteng Date: Tue, 21 Jul 2020 14:25:47 +0800 Subject: [PATCH 6/7] * Minor change in lang files. --- module/block/lang/en.php | 12 ++++++------ module/bug/lang/en.php | 4 ++-- module/story/lang/en.php | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/module/block/lang/en.php b/module/block/lang/en.php index 7b0ba77944..640d3831d3 100644 --- a/module/block/lang/en.php +++ b/module/block/lang/en.php @@ -268,7 +268,7 @@ $lang->block->modules['project']->availableBlocks->task = 'Task'; $lang->block->modules['project']->availableBlocks->build = 'Build'; $lang->block->modules['qa'] = new stdclass(); $lang->block->modules['qa']->availableBlocks = new stdclass(); -$lang->block->modules['qa']->availableBlocks->statistic = 'Testing Report'; +$lang->block->modules['qa']->availableBlocks->statistic = 'Test Report'; //$lang->block->modules['qa']->availableBlocks->overview = 'Testcase Overview'; $lang->block->modules['qa']->availableBlocks->bug = 'Bug'; $lang->block->modules['qa']->availableBlocks->case = 'Case'; @@ -397,8 +397,8 @@ $lang->block->gridOptions[8] = 'Left'; $lang->block->gridOptions[4] = 'Right'; $lang->block->flowchart = array(); -$lang->block->flowchart['admin'] = array('Administrator', 'Add Department', 'Add User', 'Maintain Privilege'); -$lang->block->flowchart['product'] = array($lang->productCommon . ' Owner', 'Add ' . $lang->productCommon, 'Maintain Module', 'Maintain Plan', 'Maintain Story', 'Create Release'); -$lang->block->flowchart['project'] = array('Scrum Master', 'Add ' . $lang->projectCommon, 'Maintain Team', 'Link ' . $lang->productCommon, 'Link Story', 'Create Task'); -$lang->block->flowchart['dev'] = array('Dev Team', 'Claim Task/Bug', 'Update Status', 'Finish Task/Bug'); -$lang->block->flowchart['tester'] = array('Test Team', 'Write Case', 'Run Case', 'Report Bug', 'Verify Bug', 'Close Bug'); +$lang->block->flowchart['admin'] = array('Administrator', 'Add Departments', 'Add Users', 'Maintain Privileges'); +$lang->block->flowchart['product'] = array($lang->productCommon . ' Owner', 'Add ' . $lang->productCommon, 'Maintain Modules', 'Maintain Plans', 'Maintain Stories', 'Create Releases'); +$lang->block->flowchart['project'] = array('Scrum Master', 'Add ' . $lang->projectCommon . 's', 'Maintain Teams', 'Link ' . $lang->productCommon . 's', 'Link Stories', 'Create Tasks'); +$lang->block->flowchart['dev'] = array('Dev Team', 'Claim Tasks/Bugs', 'Update Status', 'Finish Tasks/Bugs'); +$lang->block->flowchart['tester'] = array('Test Team', 'Write Cases', 'Run Cases', 'Report Bugs', 'Verify Bugs', 'Close Bugs'); diff --git a/module/bug/lang/en.php b/module/bug/lang/en.php index 05f37f3075..4090efbee7 100644 --- a/module/bug/lang/en.php +++ b/module/bug/lang/en.php @@ -262,8 +262,8 @@ $lang->bug->confirmedList[1] = 'Yes'; $lang->bug->confirmedList[0] = 'No'; $lang->bug->resolutionList[''] = ''; -$lang->bug->resolutionList['bydesign'] = 'As Design'; -$lang->bug->resolutionList['duplicate'] = 'Duplicated'; +$lang->bug->resolutionList['bydesign'] = 'As Designed'; +$lang->bug->resolutionList['duplicate'] = 'Duplicate'; $lang->bug->resolutionList['external'] = 'External'; $lang->bug->resolutionList['fixed'] = 'Resolved'; $lang->bug->resolutionList['notrepro'] = 'Irreproducible'; diff --git a/module/story/lang/en.php b/module/story/lang/en.php index d877e5399e..49fe33ab8d 100644 --- a/module/story/lang/en.php +++ b/module/story/lang/en.php @@ -150,11 +150,11 @@ $lang->story->stageList['closed'] = 'Closed'; $lang->story->reasonList[''] = ''; $lang->story->reasonList['done'] = 'Already Done'; $lang->story->reasonList['subdivided'] = 'Decomposed'; -$lang->story->reasonList['duplicate'] = 'Duplicated'; +$lang->story->reasonList['duplicate'] = 'Duplicate'; $lang->story->reasonList['postponed'] = 'Postponed'; $lang->story->reasonList['willnotdo'] = "Won't Do"; $lang->story->reasonList['cancel'] = 'Cancelled'; -$lang->story->reasonList['bydesign'] = 'As Design'; +$lang->story->reasonList['bydesign'] = 'As Designed'; //$lang->story->reasonList['isbug'] = 'Bug!'; $lang->story->reviewResultList[''] = ''; From 236a99519ee675e4cdc3c4b2c723df6c658890f0 Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Tue, 21 Jul 2020 17:46:01 +0800 Subject: [PATCH 7/7] * Finish task #7374. --- module/story/model.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/story/model.php b/module/story/model.php index bf0e1ec90f..eda94589c5 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -1520,8 +1520,8 @@ class storyModel extends model $branchStatusList = array(); $branchDevelTasks = array(); $branchTestTasks = array(); - $statusList['devel'] = array('wait' => 0, 'doing' => 0, 'done'=> 0); - $statusList['test'] = array('wait' => 0, 'doing' => 0, 'done'=> 0); + $statusList['devel'] = array('wait' => 0, 'doing' => 0, 'done'=> 0, 'pause' => 0); + $statusList['test'] = array('wait' => 0, 'doing' => 0, 'done'=> 0, 'pause' => 0); foreach($tasks as $type => $typeTasks) { foreach($typeTasks as $task) @@ -1565,7 +1565,7 @@ class storyModel extends model if($statusList['devel']['wait'] > 0 and $statusList['devel']['done'] > 0 and $statusList['test']['wait'] == $testTasks) $stage = 'developing'; if($statusList['devel']['done'] == $develTasks and $develTasks > 0 and $statusList['test']['wait'] == $testTasks) $stage = 'developed'; if($statusList['devel']['done'] == $develTasks and $develTasks > 0 and $statusList['test']['wait'] > 0 and $statusList['test']['done'] > 0) $stage = 'testing'; - if($statusList['test']['doing'] > 0) $stage = 'testing'; + if($statusList['test']['doing'] > 0 or $statusList['test']['pause'] > 0) $stage = 'testing'; if(($statusList['devel']['wait'] > 0 or $statusList['devel']['doing'] > 0) and $statusList['test']['done'] == $testTasks and $testTasks > 0) $stage = 'testing'; if($statusList['devel']['done'] == $develTasks and $statusList['test']['done'] == $testTasks and $testTasks > 0) $stage = 'tested';