diff --git a/module/execution/control.php b/module/execution/control.php index 6d700cdccf..f0e02813ad 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -3768,9 +3768,14 @@ class execution extends control $executions = zget($executionGroups, $project->id, array()); if(isset($project->model) and $project->model == 'waterfall') ksort($executions); + $parents = array(); + foreach($executions as $execution) $parents[$execution->parent] = $execution->parent; + foreach($executions as $execution) { - if(isset($orderedExecutions[$execution->parent]) and $project->model != 'waterfall') unset($orderedExecutions[$execution->parent]); + /* Only show leaf executions. */ + if(isset($parents[$execution->id])) continue; + $execution->teams = zget($teams, $execution->id, array()); $orderedExecutions[$execution->id] = $execution; } diff --git a/module/execution/model.php b/module/execution/model.php index 217816f94d..8fe78a505c 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -97,7 +97,6 @@ class executionModel extends model if(!$executionID or !in_array($executionID, array_keys($executions))) $executionID = key($executions); $this->session->set('execution', $executionID, $this->app->tab); - /* Unset story, bug, build and testtask if type is ops. */ if($execution and $execution->type == 'stage') { global $lang; @@ -108,6 +107,7 @@ class executionModel extends model if(isset($execution->acl) and $execution->acl != 'private') unset($this->lang->execution->menu->settings['subMenu']->whitelist); + /* Unset story, bug, build and testtask if type is ops. */ if($execution and $execution->lifetime == 'ops') { unset($this->lang->execution->menu->story);