diff --git a/db/update15.0.sql b/db/update15.0.sql index 381574d0b3..6497f775b0 100644 --- a/db/update15.0.sql +++ b/db/update15.0.sql @@ -1,3 +1,14 @@ +-- DROP TABLE IF EXISTS `zt_storyreview`; +CREATE TABLE IF NOT EXISTS `zt_storyreview` ( + `story` mediumint(9) NOT NULL, + `version` smallint(6) NOT NULL, + `reviewer` varchar(30) NOT NULL, + `result` varchar(30) NOT NULL, + `reivewDate` datetime NOT NULL, + UNIQUE KEY `story` (`story`,`version`,`reviewer`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + + ALTER TABLE `zt_project` CHANGE `lifetime` `lifetime` char(30) NOT NULL DEFAULT ''; ALTER TABLE `zt_story` ADD `category` varchar(30) NOT NULL DEFAULT 'feature' AFTER `type`; ALTER TABLE `zt_testtask` ADD `type` varchar(255) NOT NULL DEFAULT '' AFTER `build`; diff --git a/db/zentao.sql b/db/zentao.sql index be5c3a333c..2772ad6c45 100644 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -863,6 +863,15 @@ CREATE TABLE IF NOT EXISTS `zt_storyspec` ( `verify` text NOT NULL, UNIQUE KEY `story` (`story`,`version`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; +-- DROP TABLE IF EXISTS `zt_storyreview`; +CREATE TABLE IF NOT EXISTS `zt_storyreview` ( + `story` mediumint(9) NOT NULL, + `version` smallint(6) NOT NULL, + `reviewer` varchar(30) NOT NULL, + `result` varchar(30) NOT NULL, + `reivewDate` datetime NOT NULL, + UNIQUE KEY `story` (`story`,`version`,`reviewer`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_storystage`; CREATE TABLE IF NOT EXISTS `zt_storystage` ( `story` mediumint(8) unsigned NOT NULL, diff --git a/module/custom/control.php b/module/custom/control.php index bf5058b2b9..e7bcd1be22 100644 --- a/module/custom/control.php +++ b/module/custom/control.php @@ -59,6 +59,11 @@ class custom extends control $this->view->unitList = explode(',', $unitList); $this->view->defaultCurrency = zget($this->config->$module, 'defaultCurrency', 'CNY'); } + if($module == 'story' and $field == 'reviewRules') + { + $this->app->loadConfig($module); + $this->view->reviewRule = zget($this->config->$module, 'reviewRules', '1'); + } if(($module == 'story' or $module == 'testcase') and $field == 'review') { $this->app->loadConfig($module); @@ -106,6 +111,11 @@ class custom extends control $data = fixer::input('post')->join('forceReview', ',')->get(); $this->loadModel('setting')->setItems("system.$module", $data); } + elseif($module == 'story' and $field == 'reviewRules') + { + $data = fixer::input('post')->get(); + $this->loadModel('setting')->setItems("system.$module", $data); + } elseif($module == 'testcase' and $field == 'review') { $review = fixer::input('post')->get(); diff --git a/module/custom/lang/de.php b/module/custom/lang/de.php index a9ead14a0d..4b99e271d9 100644 --- a/module/custom/lang/de.php +++ b/module/custom/lang/de.php @@ -43,6 +43,7 @@ $lang->custom->browseStoryConcept = "List of story concepts"; $lang->custom->deleteStoryConcept = "Delete story Concept"; $lang->custom->URConcept = "UR Concept"; $lang->custom->SRConcept = "SR Concept"; +$lang->custom->reviewRule = 'Review Rules'; $lang->custom->switch = "Switch"; $lang->custom->oneUnit = "One {$lang->hourCommon}"; $lang->custom->convertRelationTitle = "Please set the conversion factor of {$lang->hourCommon} to %s first"; @@ -247,3 +248,6 @@ $lang->custom->conceptOptions->hourPoint['2'] = 'Function Point'; $lang->custom->scrum = new stdclass(); $lang->custom->scrum->setConcept = 'Set concept'; + +$lang->custom->reviewRules[1] = 'All passed'; +$lang->custom->reviewRules[0] = 'More than half passed'; diff --git a/module/custom/lang/en.php b/module/custom/lang/en.php index d36dc06a47..70485943fa 100644 --- a/module/custom/lang/en.php +++ b/module/custom/lang/en.php @@ -43,6 +43,7 @@ $lang->custom->browseStoryConcept = "List of story concepts"; $lang->custom->deleteStoryConcept = "Delete story Concept"; $lang->custom->URConcept = "UR Concept"; $lang->custom->SRConcept = "SR Concept"; +$lang->custom->reviewRule = 'Review Rules'; $lang->custom->switch = "Switch"; $lang->custom->oneUnit = "One {$lang->hourCommon}"; $lang->custom->convertRelationTitle = "Please set the conversion factor of {$lang->hourCommon} to %s first"; @@ -248,3 +249,6 @@ $lang->custom->conceptOptions->hourPoint['2'] = 'Function Point'; $lang->custom->scrum = new stdclass(); $lang->custom->scrum->setConcept = 'Set concept'; + +$lang->custom->reviewRules[1] = 'All passed'; +$lang->custom->reviewRules[0] = 'More than half passed'; diff --git a/module/custom/lang/fr.php b/module/custom/lang/fr.php index 61d7910aaa..57e344b47b 100644 --- a/module/custom/lang/fr.php +++ b/module/custom/lang/fr.php @@ -43,6 +43,7 @@ $lang->custom->browseStoryConcept = "List of story concepts"; $lang->custom->deleteStoryConcept = "Delete story Concept"; $lang->custom->URConcept = "UR Concept"; $lang->custom->SRConcept = "SR Concept"; +$lang->custom->reviewRule = 'Review Rules'; $lang->custom->switch = "Switch"; $lang->custom->oneUnit = "One {$lang->hourCommon}"; $lang->custom->convertRelationTitle = "Please set the conversion factor of {$lang->hourCommon} to %s first"; @@ -247,3 +248,6 @@ $lang->custom->conceptOptions->hourPoint['2'] = 'Function Point'; $lang->custom->scrum = new stdclass(); $lang->custom->scrum->setConcept = 'Set concept'; + +$lang->custom->reviewRules[1] = 'All passed'; +$lang->custom->reviewRules[0] = 'More than half passed'; diff --git a/module/custom/lang/vi.php b/module/custom/lang/vi.php index a02fecb7e2..fbfb48e835 100644 --- a/module/custom/lang/vi.php +++ b/module/custom/lang/vi.php @@ -43,6 +43,7 @@ $lang->custom->browseStoryConcept = "List of story concepts"; $lang->custom->deleteStoryConcept = "Delete story Concept"; $lang->custom->URConcept = "UR Concept"; $lang->custom->SRConcept = "SR Concept"; +$lang->custom->reviewRule = 'Review Rules'; $lang->custom->switch = "Switch"; $lang->custom->oneUnit = "One {$lang->hourCommon}"; $lang->custom->convertRelationTitle = "Please set the conversion factor of {$lang->hourCommon} to %s first"; @@ -247,3 +248,6 @@ $lang->custom->conceptOptions->hourPoint['2'] = 'Function Point'; $lang->custom->scrum = new stdclass(); $lang->custom->scrum->setConcept = 'Set concept'; + +$lang->custom->reviewRules[1] = 'All passed'; +$lang->custom->reviewRules[0] = 'More than half passed'; diff --git a/module/custom/lang/zh-cn.php b/module/custom/lang/zh-cn.php index 4bd7d560f0..18540b48d6 100644 --- a/module/custom/lang/zh-cn.php +++ b/module/custom/lang/zh-cn.php @@ -43,6 +43,7 @@ $lang->custom->browseStoryConcept = "需求概念列表"; $lang->custom->deleteStoryConcept = "删除需求概念"; $lang->custom->URConcept = "用需概念"; $lang->custom->SRConcept = "软需概念"; +$lang->custom->reviewRule = "评审规则"; $lang->custom->switch = "切换"; $lang->custom->oneUnit = "一个{$lang->hourCommon}"; $lang->custom->convertRelationTitle = "请先设置{$lang->hourCommon}转换为%s的换算系数"; @@ -102,6 +103,7 @@ $lang->custom->story->fields['sourceList'] = '来源'; $lang->custom->story->fields['reasonList'] = '关闭原因'; $lang->custom->story->fields['stageList'] = '阶段'; $lang->custom->story->fields['statusList'] = '状态'; +$lang->custom->story->fields['reviewRules'] = '评审规则'; $lang->custom->story->fields['reviewResultList'] = '评审结果'; $lang->custom->story->fields['review'] = '评审流程'; @@ -248,3 +250,6 @@ $lang->custom->conceptOptions->hourPoint['2'] = '功能点'; $lang->custom->scrum = new stdclass(); $lang->custom->scrum->setConcept = '设置项目概念'; + +$lang->custom->reviewRules[1] = '全部通过通过'; +$lang->custom->reviewRules[0] = '半数以上通过通过'; diff --git a/module/custom/lang/zh-tw.php b/module/custom/lang/zh-tw.php index 76e5d66b07..63b6f736b9 100644 --- a/module/custom/lang/zh-tw.php +++ b/module/custom/lang/zh-tw.php @@ -43,6 +43,7 @@ $lang->custom->browseStoryConcept = "需求概念列表"; $lang->custom->deleteStoryConcept = "刪除需求概念"; $lang->custom->URConcept = "用需概念"; $lang->custom->SRConcept = "軟需概念"; +$lang->custom->reviewRule = '評審規則'; $lang->custom->switch = "切換"; $lang->custom->oneUnit = "一個{$lang->hourCommon}"; $lang->custom->convertRelationTitle = "請先設置{$lang->hourCommon}轉換為%s的換算係數"; @@ -248,3 +249,6 @@ $lang->custom->conceptOptions->hourPoint['2'] = '功能點'; $lang->custom->scrum = new stdclass(); $lang->custom->scrum->setConcept = '設置項目概念'; + +$lang->custom->reviewRules[1] = '全部通過通過'; +$lang->custom->reviewRules[0] = '半數以上通過通過'; diff --git a/module/custom/view/set.html.php b/module/custom/view/set.html.php index 9b0adf192b..ea2287d284 100644 --- a/module/custom/view/set.html.php +++ b/module/custom/view/set.html.php @@ -70,6 +70,17 @@ EOT;
| custom->reviewRule;?> | +custom->reviewRules, $reviewRule);?> | ++ |
|---|---|---|
| + | ||