* Finis task #54352.
This commit is contained in:
@@ -880,6 +880,7 @@ class execution extends control
|
||||
$this->loadModel('bug');
|
||||
$this->loadModel('user');
|
||||
$this->loadModel('product');
|
||||
$this->loadModel('datatable');
|
||||
|
||||
/* Save session. */
|
||||
$this->session->set('bugList', $this->app->getURI(true), 'execution');
|
||||
@@ -921,22 +922,60 @@ class execution extends control
|
||||
$actionURL = $this->createLink('execution', 'bug', "executionID=$executionID&productID=$productID&orderBy=$orderBy&build=$build&type=bysearch&queryID=myQueryID");
|
||||
$this->execution->buildBugSearchForm($products, $queryID, $actionURL);
|
||||
|
||||
$showBranch = false;
|
||||
$branchOption = array();
|
||||
$branchTagOption = array();
|
||||
if($product and $product->type != 'normal')
|
||||
{
|
||||
/* Display of branch label. */
|
||||
$showBranch = $this->loadModel('branch')->showBranch($productID);
|
||||
|
||||
/* Display status of branch. */
|
||||
$branches = $this->loadModel('branch')->getList($productID, 0, 'all');
|
||||
foreach($branches as $branchInfo)
|
||||
{
|
||||
$branchOption[$branchInfo->id] = $branchInfo->name;
|
||||
$branchTagOption[$branchInfo->id] = $branchInfo->name . ($branchInfo->status == 'closed' ? ' (' . $this->lang->branch->statusList['closed'] . ')' : '');
|
||||
}
|
||||
}
|
||||
|
||||
/* Get story and task id list. */
|
||||
$storyIdList = $taskIdList = array();
|
||||
foreach($bugs as $bug)
|
||||
{
|
||||
if($bug->story) $storyIdList[$bug->story] = $bug->story;
|
||||
if($bug->task) $taskIdList[$bug->task] = $bug->task;
|
||||
if($bug->toTask) $taskIdList[$bug->toTask] = $bug->toTask;
|
||||
}
|
||||
$storyList = $storyIdList ? $this->loadModel('story')->getByList($storyIdList) : array();
|
||||
$taskList = $taskIdList ? $this->loadModel('task')->getByList($taskIdList) : array();
|
||||
|
||||
$showModule = !empty($this->config->datatable->bugBrowse->showModule) ? $this->config->datatable->bugBrowse->showModule : '';
|
||||
|
||||
/* Assign. */
|
||||
$this->view->title = $title;
|
||||
$this->view->position = $position;
|
||||
$this->view->bugs = $bugs;
|
||||
$this->view->tabID = 'bug';
|
||||
$this->view->build = $this->loadModel('build')->getById($build);
|
||||
$this->view->buildID = $this->view->build ? $this->view->build->id : 0;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->users = $users;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->branchID = empty($this->view->build->branch) ? $branchID : $this->view->build->branch;
|
||||
$this->view->memberPairs = $memberPairs;
|
||||
$this->view->type = $type;
|
||||
$this->view->param = $param;
|
||||
$this->view->defaultProduct = (empty($productID) and !empty($products)) ? current(array_keys($products)) : $productID;
|
||||
$this->view->title = $title;
|
||||
$this->view->position = $position;
|
||||
$this->view->bugs = $bugs;
|
||||
$this->view->tabID = 'bug';
|
||||
$this->view->build = $this->loadModel('build')->getById($build);
|
||||
$this->view->buildID = $this->view->build ? $this->view->build->id : 0;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->users = $users;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->branchID = empty($this->view->build->branch) ? $branchID : $this->view->build->branch;
|
||||
$this->view->memberPairs = $memberPairs;
|
||||
$this->view->type = $type;
|
||||
$this->view->param = $param;
|
||||
$this->view->defaultProduct = (empty($productID) and !empty($products)) ? current(array_keys($products)) : $productID;
|
||||
$this->view->builds = $this->loadModel('build')->getBuildPairs($productID);
|
||||
$this->view->branchOption = $branchOption;
|
||||
$this->view->branchTagOption = $branchTagOption;
|
||||
$this->view->modulePairs = $showModule ? $this->loadModel('tree')->getModulePairs($productID, 'bug', $showModule) : array();
|
||||
$this->view->plans = $this->loadModel('productplan')->getPairs($productID);
|
||||
$this->view->stories = $storyList;
|
||||
$this->view->tasks = $taskList;
|
||||
$this->view->projectPairs = $this->loadModel('project')->getPairsByProgram();
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user