* Optimize code for task #83948.

This commit is contained in:
liumengyi
2023-02-07 11:02:46 +08:00
parent b50b507b27
commit 5719c8c252
2 changed files with 7 additions and 9 deletions
+6 -1
View File
@@ -1639,7 +1639,12 @@ class executionModel extends model
if($execution->parent < 0 and $execution->type == 'stage') unset($executions[$key]);
if($execution->projectName) $execution->name = $execution->projectName . ' / ' . $execution->name;
}
elseif($param != 'importKanban')
elseif($param === 'hasParentName')
{
$parentExecutions = $this->dao->select('id,name')->from(TABLE_EXECUTION)->where('id')->in(trim($execution->path, ','))->andWhere('type')->in('stage,kanban,sprint')->orderBy('grade')->fetchPairs();
$executions[$execution->id]->name = implode('/', $parentExecutions);
}
else
{
if(isset($executions[$execution->parent]) and $execution->type == 'stage')
{