* [task#129062,doing,0.5h] Add the relate object of bug view page.

This commit is contained in:
xieqiyu
2024-09-30 13:43:01 +08:00
committed by 王于听
parent e4a689ba52
commit 9bbac5c0a8
2 changed files with 25 additions and 16 deletions
+17 -16
View File
@@ -184,22 +184,23 @@ class bug extends control
$this->session->set('projectList', $this->app->getURI(true) . "#app={$this->app->tab}", 'project');
if($this->app->tab == 'repo') $this->view->repoID = $bug->repo;
$this->view->title = "BUG #$bug->id $bug->title - " . $product->name;
$this->view->branchID = $bug->branch;
$this->view->product = $product;
$this->view->project = $this->loadModel('project')->getByID($bug->project);
$this->view->projects = $projects;
$this->view->executions = $this->product->getExecutionPairsByProduct($bug->product, (string)$bug->branch, (int)$projectID, 'noclosed');
$this->view->bug = $bug;
$this->view->bugModule = empty($bug->module) ? '' : $this->tree->getByID($bug->module);
$this->view->modulePath = $this->loadModel('tree')->getParents($bug->module);
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->branches = $branches;
$this->view->branchName = $product->type == 'normal' ? '' : zget($branches, $bug->branch, '');
$this->view->builds = $this->loadModel('build')->getBuildPairs(array($bug->product), 'all', 'noterminate,nodone,hasdeleted');
$this->view->linkCommits = $this->loadModel('repo')->getCommitsByObject($bug->id, 'bug');
$this->view->actions = $this->loadModel('action')->getList('bug', $bug->id);
$this->view->preAndNext = $this->loadModel('common')->getPreAndNextObject('bug', $bugID);
$this->view->title = "BUG #$bug->id $bug->title - " . $product->name;
$this->view->branchID = $bug->branch;
$this->view->product = $product;
$this->view->project = $this->loadModel('project')->getByID($bug->project);
$this->view->projects = $projects;
$this->view->executions = $this->product->getExecutionPairsByProduct($bug->product, (string)$bug->branch, (int)$projectID, 'noclosed');
$this->view->bug = $bug;
$this->view->bugModule = empty($bug->module) ? '' : $this->tree->getByID($bug->module);
$this->view->modulePath = $this->loadModel('tree')->getParents($bug->module);
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->branches = $branches;
$this->view->branchName = $product->type == 'normal' ? '' : zget($branches, $bug->branch, '');
$this->view->builds = $this->loadModel('build')->getBuildPairs(array($bug->product), 'all', 'noterminate,nodone,hasdeleted');
$this->view->linkCommits = $this->loadModel('repo')->getCommitsByObject($bug->id, 'bug');
$this->view->actions = $this->loadModel('action')->getList('bug', $bug->id);
$this->view->preAndNext = $this->loadModel('common')->getPreAndNextObject('bug', $bugID);
$this->view->relatedObjects = $this->loadModel('custom')->getRelatedObjectList($bug->id, 'bug');
$this->display();
}
+8
View File
@@ -141,6 +141,14 @@ $tabs[] = setting()
->title($lang->bug->legendMisc)
->control('bugRelatedList');
/* 关联对象。Relate object. */
$tabs[] = setting()
->group('related')
->title($lang->custom->relateObject)
->control('relatedObjectList')
->objectID($bug->id)
->objectType('bug');
detail
(
set::urlFormatter(array('{id}' => $bug->id, '{product}' => $bug->product, '{branch}' => $bug->branch, '{project}' => $bug->project, '{execution}' => $bug->execution, '{module}' => $bug->module, '{confirmeObjectID}' => isset($bug->confirmeObjectID) ? $bug->confirmeObjectID : 0)),