From a7980a485247828c8bb9533861ae539e750caa19 Mon Sep 17 00:00:00 2001 From: liuhong Date: Tue, 27 Sep 2022 02:15:22 +0000 Subject: [PATCH] *Update code logic. --- module/task/control.php | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/module/task/control.php b/module/task/control.php index 87ff53705d..6b4220d7cd 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -611,14 +611,24 @@ class task extends control if(!isset($this->view->members[$this->view->task->assignedTo])) $this->view->members[$this->view->task->assignedTo] = $this->view->task->assignedTo; if(isset($this->view->members['closed']) or $this->view->task->status == 'closed') $this->view->members['closed'] = 'Closed'; - $executionList = $this->execution->getByProject($task->project, 'noclosed', 0, true, false, $task->execution); - $project = $this->loadModel('project')->getByID($task->project); - $replace = substr(current($executionList), 0, strpos(current($executionList), '/')); - $executions = array(); - foreach($executionList as $val) + $executions = array(); + if(!empty($task->project)) { - $values = str_replace($replace, $project->name, $val); - $executions[] = $values; + $executionList = $this->execution->getPairs($task->project); + $project = $this->loadModel('project')->getByID($task->project); + + if(isset($project->model) and $project->model == 'waterfall') + { + foreach($executionList as $key=>$val) + { + $values = $project->name . '/' . $val; + $executions[$key] = $values; + } + } + else + { + $executions = $executionList; + } } $this->view->title = $this->lang->task->edit . 'TASK' . $this->lang->colon . $this->view->task->name;