diff --git a/module/execution/model.php b/module/execution/model.php index 9100466ed3..dec89c9cd2 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -2510,6 +2510,8 @@ class executionModel extends model $executionStories = $this->loadModel('story')->getExecutionStoryPairs($execution->id); $lastOrder = (int)$this->dao->select('`order`')->from(TABLE_PROJECTSTORY)->where('project')->eq($execution->id)->orderBy('order_desc')->limit(1)->fetch('order'); $stories = $this->dao->select("id as story, product, version")->from(TABLE_STORY)->where('id')->in(array_keys($taskStories))->fetchAll('story'); + + $this->loadModel('action'); foreach($taskStories as $storyID) { if(!isset($executionStories[$storyID]) && isset($stories[$storyID])) @@ -2980,6 +2982,9 @@ class executionModel extends model $task->finishedBy = ''; $task->finishedDate = null; + if(!$task->closedDate) unset($task->closedDate); + if(!$task->activatedDate) unset($task->activatedDate); + $this->loadModel('task')->cancel($task); } return !dao::isError(); diff --git a/module/execution/test/model/accessdenied.php b/module/execution/test/model/accessdenied.php old mode 100644 new mode 100755 index 28077376a8..2414db735d --- a/module/execution/test/model/accessdenied.php +++ b/module/execution/test/model/accessdenied.php @@ -5,10 +5,8 @@ include dirname(__FILE__, 5) . '/test/lib/init.php'; /** title=测试 executionModel::accessDenied(); +timeout=0 cid=1 -pid=1 - -权限不足跳转 >> html */ diff --git a/module/execution/test/model/afterimportbug.php b/module/execution/test/model/afterimportbug.php old mode 100644 new mode 100755 diff --git a/module/execution/test/model/afterimporttask.php b/module/execution/test/model/afterimporttask.php old mode 100644 new mode 100755 diff --git a/module/execution/test/model/afterunlinkstory.php b/module/execution/test/model/afterunlinkstory.php old mode 100644 new mode 100755 diff --git a/module/execution/test/model/appendtasks.php b/module/execution/test/model/appendtasks.php old mode 100644 new mode 100755 diff --git a/module/execution/test/model/batchprocessname.php b/module/execution/test/model/batchprocessname.php old mode 100644 new mode 100755 diff --git a/module/execution/test/model/buildbugsearchform.php b/module/execution/test/model/buildbugsearchform.php old mode 100644 new mode 100755 diff --git a/module/execution/test/model/buildcfddata.php b/module/execution/test/model/buildcfddata.php old mode 100644 new mode 100755 diff --git a/module/execution/test/model/buildsearchform.php b/module/execution/test/model/buildsearchform.php old mode 100644 new mode 100755 diff --git a/module/execution/test/model/buildstorysearchform.php b/module/execution/test/model/buildstorysearchform.php old mode 100644 new mode 100755 diff --git a/module/execution/test/model/buildtasksearchform.php b/module/execution/test/model/buildtasksearchform.php old mode 100644 new mode 100755 diff --git a/module/execution/test/model/buildtree.php b/module/execution/test/model/buildtree.php old mode 100644 new mode 100755 diff --git a/module/execution/test/model/checkbeginandenddate.php b/module/execution/test/model/checkbeginandenddate.php old mode 100644 new mode 100755 diff --git a/module/execution/test/model/checkworkload.php b/module/execution/test/model/checkworkload.php old mode 100644 new mode 100755 diff --git a/module/execution/test/model/computecfd.php b/module/execution/test/model/computecfd.php old mode 100644 new mode 100755 diff --git a/module/execution/test/model/createdefaultsprint.php b/module/execution/test/model/createdefaultsprint.php old mode 100644 new mode 100755 diff --git a/module/execution/test/model/data/project_etbyid.yaml b/module/execution/test/model/data/project_etbyid.yaml old mode 100644 new mode 100755 diff --git a/module/execution/test/model/data/sql/project.sql b/module/execution/test/model/data/sql/project.sql old mode 100644 new mode 100755 diff --git a/module/execution/test/model/filltasksintree.php b/module/execution/test/model/filltasksintree.php old mode 100644 new mode 100755 diff --git a/module/execution/test/model/getburndata.php b/module/execution/test/model/getburndata.php old mode 100644 new mode 100755 diff --git a/module/execution/test/model/getcfddata.php b/module/execution/test/model/getcfddata.php old mode 100644 new mode 100755 diff --git a/module/execution/test/model/getexecutionfeatures.php b/module/execution/test/model/getexecutionfeatures.php old mode 100644 new mode 100755 diff --git a/module/execution/test/model/getfullnamelist.php b/module/execution/test/model/getfullnamelist.php old mode 100644 new mode 100755 diff --git a/module/execution/test/model/getlanemaxeditedtime.php b/module/execution/test/model/getlanemaxeditedtime.php old mode 100644 new mode 100755 diff --git a/module/execution/test/model/getnomultipleid.php b/module/execution/test/model/getnomultipleid.php old mode 100644 new mode 100755 index fcd419dae9..a659087b69 --- a/module/execution/test/model/getnomultipleid.php +++ b/module/execution/test/model/getnomultipleid.php @@ -1,9 +1,6 @@ #!/usr/bin/env php gen(5); -su('admin'); $execution = zdTable('project'); $execution->id->range('1-3'); @@ -18,17 +15,20 @@ $execution->begin->range('20220112 000000:0')->type('timestamp')->format('YY/MM/ $execution->end->range('20220212 000000:0')->type('timestamp')->format('YY/MM/DD'); $execution->gen(3); +zdTable('user')->gen(5); +su('admin'); + /** -title=测试executionModel->getNoMultipleID(); +title=测试 executionModel->getNoMultipleID(); timeout=0 cid=1 */ global $tester; -$tester->loadModel('execution'); +$executionModel = $tester->loadModel('execution'); -r($tester->execution->getNoMultipleID(2)) & p() && e('3'); // 根据正确项目ID获取被隐藏的执行id -r($tester->execution->getNoMultipleID(0)) & p() && e('0'); // 根据空项目ID获取被隐藏的执行id -r($tester->execution->getNoMultipleID(5)) & p() && e('0'); // 根据不存在的项目ID获取被隐藏的执行id +r($executionModel->getNoMultipleID(2)) && p() && e('3'); // 根据正确项目ID获取被隐藏的执行id +r($executionModel->getNoMultipleID(0)) && p() && e('0'); // 根据空项目ID获取被隐藏的执行id +r($executionModel->getNoMultipleID(5)) && p() && e('0'); // 根据不存在的项目ID获取被隐藏的执行id diff --git a/module/execution/test/model/processproductplans.php b/module/execution/test/model/processproductplans.php old mode 100644 new mode 100755 diff --git a/module/execution/test/model/processtasks.php b/module/execution/test/model/processtasks.php old mode 100644 new mode 100755 diff --git a/module/execution/test/model/removemenu.php b/module/execution/test/model/removemenu.php old mode 100644 new mode 100755 diff --git a/module/execution/test/model/resetexecutionsorts.php b/module/execution/test/model/resetexecutionsorts.php old mode 100644 new mode 100755 diff --git a/module/execution/test/model/setkanban.php b/module/execution/test/model/setkanban.php old mode 100644 new mode 100755 diff --git a/module/execution/test/model/setmenu.php b/module/execution/test/model/setmenu.php old mode 100644 new mode 100755 diff --git a/module/execution/test/model/setprojectsession.php b/module/execution/test/model/setprojectsession.php old mode 100644 new mode 100755 diff --git a/module/execution/test/model/syncnomultiplesprint.php b/module/execution/test/model/syncnomultiplesprint.php old mode 100644 new mode 100755 diff --git a/module/execution/test/model/updatecfddata.php b/module/execution/test/model/updatecfddata.php old mode 100644 new mode 100755 diff --git a/module/execution/test/model/updateprojectusers.php b/module/execution/test/model/updateprojectusers.php old mode 100644 new mode 100755 diff --git a/module/execution/test/yaml/task.yaml b/module/execution/test/yaml/task.yaml index 062032c51b..bf20d876dc 100755 --- a/module/execution/test/yaml/task.yaml +++ b/module/execution/test/yaml/task.yaml @@ -34,19 +34,19 @@ fields: - field: estStarted range: "20201101 000000:1D" type: timestamp - format: "YY/MM/DD hh::mm:ss" + format: "YYYY-MM-DD" postfix: "\t" - field: deadline range: "20210101 000000:1D" type: timestamp - format: "YY/MM/DD" + format: "YYYY-MM-DD" postfix: "\t" - field: finishedBy range: "[]{4},admin,[]{4}" - field: finishedDate range: "20210101 000000:1D" type: timestamp - format: "YY/MM/DD hh::mm:ss" + format: "YYYY-MM-DD" postfix: "\t" - field: closedReason range: "[]{4},done,[]{4}"