* Only show leaf executions for switcher.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user