* Only show leaf executions for switcher.

This commit is contained in:
zhujinyong
2023-02-15 16:35:39 +08:00
parent c3d7d4cda3
commit fd6df950a8
2 changed files with 7 additions and 2 deletions
+6 -1
View File
@@ -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;
}
+1 -1
View File
@@ -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);