From 1d1ae03b958967d3eb098b62d7b4973c2c6461b7 Mon Sep 17 00:00:00 2001 From: liuhong Date: Sun, 9 Oct 2022 03:20:04 +0000 Subject: [PATCH] * The execution logic to which the update task belongs when it is newly created. --- module/task/control.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/module/task/control.php b/module/task/control.php index 6b4220d7cd..6f198e7b8e 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -291,7 +291,22 @@ class task extends control /* Set Custom*/ foreach(explode(',', $this->config->task->customCreateFields) as $field) $customFields[$field] = $this->lang->task->$field; - $executions = $this->config->systemMode == 'classic' ? $executions : $this->execution->getByProject($projectID, 'noclosed', 0, true); + $executionAll = array(); + if(!empty($projectID)) + { + $executionList = $this->execution->getByProject($projectID, 'noclosed', 0, true); + $project = $this->loadModel('project')->getByID($projectID); + $replace = substr(current($executionList), 0, strpos(current($executionList), '/')); + if(isset($project->model) and $project->model == 'waterfall') + { + foreach($executionList as $key => $val) + { + $values = str_replace($replace, $project->name, $val); + $executionAll[$key] = $values; + } + } + } + $executions = $this->config->systemMode == 'classic' ? $executions : $executionAll; $testStoryIdList = $this->loadModel('story')->getTestStories(array_keys($stories), $execution->id); /* Stories that can be used to create test tasks. */