From a4f026d786e72e458a6c3208e0c0fad0d44b2e33 Mon Sep 17 00:00:00 2001 From: sunjun Date: Mon, 16 May 2022 09:08:47 +0800 Subject: [PATCH] sprint_sunjun_631 --- module/execution/control.php | 10 ++++++++++ module/execution/view/all.html.php | 10 ++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index 17ac64b75a..407d833f02 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -3342,10 +3342,20 @@ class execution extends control $executionStats = $this->project->getStats($projectID, $status, $productID, 0, 30, $orderBy, $pager); + $parentIdList = array(); + foreach($executionStats as $execution) + { + if($execution->type != 'stage') continue; + if($execution->grade == 2 and $execution->project != $execution->parent) $parentIdList[$execution->parent] = $execution->parent; + } + $parents = array(); + if($parentIdList) $parents = $this->execution->getByIdList($parentIdList); + $this->view->executionStats = $executionStats; $this->view->productList = $this->loadModel('product')->getProductPairsByProject($projectID); $this->view->productID = $productID; $this->view->projectID = $projectID; + $this->view->parents = $parents; $this->view->projects = array('') + $this->project->getPairsByProgram(); $this->view->pager = $pager; $this->view->orderBy = $orderBy; diff --git a/module/execution/view/all.html.php b/module/execution/view/all.html.php index 03c34d9e3a..15d04376ac 100644 --- a/module/execution/view/all.html.php +++ b/module/execution/view/all.html.php @@ -128,13 +128,19 @@ id);?> - flex' title='name?>'> + name; + $onlyChildStage = ($execution->grade == 2 and $execution->project != $execution->parent); + if($onlyChildStage and isset($parents[$execution->parent])) $executionName = $parents[$execution->parent]->name . '/' . $executionName; + ?> + flex' title=''> systemMode == 'new'):?> '>execution->typeList[$execution->type]?> projectModel == 'kanban' ? html::a($this->createLink('execution', 'kanban', 'executionID=' . $execution->id), $execution->name, '', "class='text-ellipsis'") : html::a($this->createLink('execution', 'task', 'execution=' . $execution->id), $execution->name, '', "class='text-ellipsis'"); + $executionLink = $execution->projectModel == 'kanban' ? html::a($this->createLink('execution', 'kanban', 'executionID=' . $execution->id), $executionName, '', "class='text-ellipsis'") : html::a($this->createLink('execution', 'task', 'execution=' . $execution->id), $executionName, '', "class='text-ellipsis'"); echo !empty($execution->children) ? $execution->name : $executionLink; + if($onlyChildStage) echo "{$lang->programplan->childrenAB} "; if(isset($execution->delay)) echo "{$lang->execution->delayed} "; ?> children)):?>