diff --git a/module/task/control.php b/module/task/control.php index 5683224460..fb8735d3dd 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. */