* [bug#59214] adjust bug view page actions for devops.

This commit is contained in:
caoyanyi
2025-01-14 10:02:13 +08:00
committed by 田淑杰
parent e4c8529d12
commit c49fdeed8f
2 changed files with 18 additions and 1 deletions
+3 -1
View File
@@ -196,17 +196,19 @@ class bug extends control
$branches = $product->type == 'normal' ? array() : $this->loadModel('branch')->getPairs($bug->product);
$projects = $this->product->getProjectPairsByProduct($bug->product, (string)$bug->branch);
$projectID = isset($projects[$bug->project]) ? $bug->project : key($projects);
if(in_array($this->app->tab, array('project', 'execution')))
{
$objectType = $this->app->tab == 'project' ? 'projectID' : 'executionID';
$this->view->{$objectType} = $this->session->{$this->app->tab};
}
if($this->app->tab == 'devops') $this->bugZen->processRepoIssueActions((int)$bug->repo);
$this->session->set('project', $projectID, 'project');
$this->session->set('storyList', '', 'product');
$this->session->set('projectList', $this->app->getURI(true) . "#app={$this->app->tab}", 'project');
if($this->app->tab == 'devops') $this->view->repoID = $bug->repo;
$this->view->title = "BUG #$bug->id $bug->title - " . $product->name;
$this->view->branchID = $bug->branch;
$this->view->product = $product;