diff --git a/module/execution/control.php b/module/execution/control.php index 0f3f306bda..407d833f02 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -3138,7 +3138,7 @@ class execution extends control foreach($executions as $execution) { - if(isset($orderedExecutions[$execution->parent])) unset($orderedExecutions[$execution->parent]); + if(isset($orderedExecutions[$execution->parent]) and $project->model != 'waterfall') unset($orderedExecutions[$execution->parent]); $execution->teams = zget($teams, $execution->id, array()); $orderedExecutions[$execution->id] = $execution; } @@ -3160,11 +3160,20 @@ class execution extends control $projectExecutions = array(); $parentIdList = array(); + $childrenIdList = array(); foreach($orderedExecutions as $execution) { - $projectExecutions[$execution->project][] = $execution; if($execution->type != 'stage') continue; - if($execution->grade == 2 and $execution->project != $execution->parent) $parentIdList[$execution->parent] = $execution->parent; + if($execution->grade == 2 and $execution->project != $execution->parent) + { + $parentIdList[$execution->parent] = $execution->parent; + $childrenIdList[$execution->parent][] = $execution->id; + } + } + foreach($orderedExecutions as $id => $execution) + { + $execution->children = isset($childrenIdList[$execution->id]) ? $childrenIdList[$execution->id] : array(); + $projectExecutions[$execution->project][] = $execution; } $parents = array(); diff --git a/module/execution/view/ajaxgetdropmenu.html.php b/module/execution/view/ajaxgetdropmenu.html.php index f5c2d77aa6..d504cfd1a3 100644 --- a/module/execution/view/ajaxgetdropmenu.html.php +++ b/module/execution/view/ajaxgetdropmenu.html.php @@ -71,7 +71,6 @@ foreach($executions as $projectID => $projectExecutions) if($executionCounts[$projectID]['others']) $normalExecutionsHtml .= '