From eec155064ad5809e7f44b13742bcc22eb130a777 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=80=A1=E6=A0=8B?= Date: Wed, 20 Apr 2022 11:26:32 +0800 Subject: [PATCH] * fix bug #20933. --- module/action/model.php | 2 +- module/execution/control.php | 14 +++++++++++++- module/execution/css/all.css | 2 ++ module/execution/view/all.html.php | 12 +++++++++--- 4 files changed, 25 insertions(+), 5 deletions(-) diff --git a/module/action/model.php b/module/action/model.php index 2b42174155..8a7690b2d9 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -490,7 +490,7 @@ class actionModel extends model $name = $this->dao->select('name')->from(TABLE_TESTSUITE)->where('id')->eq($action->extra)->fetch('name'); if($name) $action->extra = common::hasPriv('caselib', 'browse') ? html::a(helper::createLink('caselib', 'browse', "libID=$action->extra"), $name) : $name; } - elseif(strpos('importfromstorylib,importfromrisklib,importfromissuelib,importfromopportunitylib', $actionName) !== false) + elseif(strpos(',importfromstorylib,importfromrisklib,importfromissuelib,importfromopportunitylib,', ",{$actionName},") !== false and $this->config->edition == 'max') { $name = $this->dao->select('name')->from(TABLE_ASSETLIB)->where('id')->eq($action->extra)->fetch('name'); if($name) $action->extra = common::hasPriv('assetlib', $action->objectType) ? html::a(helper::createLink('assetlib', $action->objectType, "libID=$action->extra"), $name) : $name; diff --git a/module/execution/control.php b/module/execution/control.php index 904db8455a..ed7f16616a 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -3310,10 +3310,22 @@ class execution extends control $this->view->title = $this->lang->execution->allExecutions; $this->view->position[] = $this->lang->execution->allExecutions; - $this->view->executionStats = $this->project->getStats($projectID, $status, $productID, 0, 30, $orderBy, $pager); + $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/css/all.css b/module/execution/css/all.css index c6d895178a..c1ac7084d4 100644 --- a/module/execution/css/all.css +++ b/module/execution/css/all.css @@ -24,3 +24,5 @@ td.flex span.project-type-label {margin-left: 5px; min-width: 36px;} .c-action {text-align: center;} .c-name > span {margin-right: 2px;} td.flex span.project-type-label {min-width: 40px;} + +.label-children {min-width:22px !important;} diff --git a/module/execution/view/all.html.php b/module/execution/view/all.html.php index 44dfab54d5..3040a6e2b1 100644 --- a/module/execution/view/all.html.php +++ b/module/execution/view/all.html.php @@ -124,12 +124,18 @@ 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'"); + if($onlyChildStage) echo "{$lang->programplan->childrenAB} "; echo !empty($execution->children) ? $execution->name : $executionLink; if(isset($execution->delay)) echo "{$lang->execution->delayed} "; ?> @@ -214,9 +220,9 @@ delay)) echo "{$lang->execution->delayed} "; echo "{$lang->programplan->childrenAB}"; echo html::a($this->createLink('execution', 'task', 'execution=' . $child->id), $child->name); + if(isset($child->delay)) echo "{$lang->execution->delayed} "; ?> PM);?>