* [task#131482,doing,0.5h] Add the param for the function of getRelatedObjectList.

This commit is contained in:
xieqiyu
2024-10-31 17:34:38 +08:00
committed by 胡方舟
parent 30e5001884
commit d0ab04853f
4 changed files with 8 additions and 4 deletions
+2 -1
View File
@@ -759,6 +759,7 @@ class bugZen extends bug
protected function buildBrowseView(array $bugs, object $product, string $branch, string $browseType, int $moduleID, array $executions, int $param, string $orderBy, object $pager): void
{
$this->loadModel('datatable');
$this->loadModel('custom');
/* 获取分支列表。*/
/* Get branch options. */
@@ -781,7 +782,7 @@ class bugZen extends bug
$bug->identify = zget($identifyList, $bug->identify, '');
}
if($this->config->edition != 'open') $bug->relatedObject = $this->loadModel('custom')->getRelatedObjectList($bug->id, 'bug', true);
if($this->config->edition != 'open') $bug->relatedObject = $this->custom->getRelatedObjectList($bug->id, 'bug', 'byRelation', true);
}
$showModule = !empty($this->config->bug->browse->showModule) ? $this->config->bug->browse->showModule : '';
+2 -1
View File
@@ -115,7 +115,8 @@ class design extends control
$designs = $this->design->getList($projectID, $productID, $type, $queryID, $orderBy, $pager);
if($this->config->edition != 'open')
{
foreach($designs as $design) $design->relatedObject = $this->loadModel('custom')->getRelatedObjectList($design->id, 'design', true);
$this->loadModel('custom');
foreach($designs as $design) $design->relatedObject = $this->custom->getRelatedObjectList($design->id, 'design', 'byRelation', true);
}
$this->view->title = $this->lang->design->common . $this->lang->hyphen . $this->lang->design->browse;
+2 -1
View File
@@ -163,6 +163,7 @@ class execution extends control
/* Append branches to task. */
$this->loadModel('task');
$this->loadModel('custom');
$branchGroups = $this->loadModel('branch')->getByProducts(array_keys($this->view->products));
foreach($tasks as $task)
{
@@ -182,7 +183,7 @@ class execution extends control
}
if(isset($branchGroups[$task->product][$task->branch])) $task->branch = $branchGroups[$task->product][$task->branch];
if($task->needConfirm) $task->status = 'changed';
if($this->config->edition != 'open') $task->relatedObject = $this->loadModel('custom')->getRelatedObjectList($task->id, 'task', true);
if($this->config->edition != 'open') $task->relatedObject = $this->custom->getRelatedObjectList($task->id, 'task', 'byRelation', true);
}
$showAllModule = empty($this->config->execution->task->allModule) ? '' : 'allModule';
+2 -1
View File
@@ -519,7 +519,8 @@ class testcaseZen extends testcase
if($this->config->edition != 'open')
{
foreach($cases as $caseID => $case) $case->relatedObject = $this->loadModel('custom')->getRelatedObjectList($caseID, 'testcase', true);
$this->loadModel('custom');
foreach($cases as $caseID => $case) $case->relatedObject = $this->custom->getRelatedObjectList($caseID, 'testcase', 'byRelation', true);
}
$this->view->cases = array_merge($scenes, $cases);