diff --git a/module/bug/model.php b/module/bug/model.php index e2dc702abf..0835194d51 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -1813,7 +1813,7 @@ class bugModel extends model * @access public * @return array */ - public function getExecutionBugs($executionID, $productID = 0, $branchID = 0, $build = 0, $type = '', $param = 0, $orderBy = 'id_desc', $excludeBugs = '', $pager = null) + public function getExecutionBugs($executionID, $productID = 0, $branchID = 'all', $build = 0, $type = '', $param = 0, $orderBy = 'id_desc', $excludeBugs = '', $pager = null) { $type = strtolower($type); if($type == 'bysearch') @@ -1846,7 +1846,7 @@ class bugModel extends model $bugs = $this->dao->select('t1.*')->from(TABLE_BUG)->alias('t1') ->leftJoin(TABLE_MODULE)->alias('t2')->on('t1.module=t2.id') ->where('t1.deleted')->eq(0) - ->andWhere('t1.branch')->eq($branchID) + ->beginIF($branchID != 'all')->andWhere('t1.branch')->eq($branchID)->fi() ->beginIF(empty($build))->andWhere('t1.execution')->eq($executionID)->fi() ->beginIF(!empty($productID))->andWhere('t1.product')->eq($productID)->fi() ->beginIF($type == 'unresolved')->andWhere('t1.status')->eq('active')->fi() diff --git a/module/build/control.php b/module/build/control.php index 40b99a6fa0..df9d5102d1 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -270,7 +270,7 @@ class build extends control $this->view->storyPager = $storyPager; $generatedBugPager = new pager($type == 'generatedBug' ? $recTotal : 0, $recPerPage, $type == 'generatedBug' ? $pageID : 1); - $this->view->generatedBugs = $this->bug->getExecutionBugs($build->execution, $build->product, $build->id, $type, $param, $type == 'generatedBug' ? $orderBy : 'status_desc,id_desc', '', $generatedBugPager); + $this->view->generatedBugs = $this->bug->getExecutionBugs($build->execution, $build->product, 'all', $build->id, $type, $param, $type == 'generatedBug' ? $orderBy : 'status_desc,id_desc', '', $generatedBugPager); $this->view->generatedBugPager = $generatedBugPager; $this->executeHooks($buildID); @@ -682,7 +682,7 @@ class build extends control } else { - $allBugs = $this->bug->getExecutionBugs($build->execution, 0, $buildID, 'noclosed', 0, 'status_desc,id_desc', $build->bugs, $pager); + $allBugs = $this->bug->getExecutionBugs($build->execution, 0, 'all', $buildID, 'noclosed', 0, 'status_desc,id_desc', $build->bugs, $pager); } $this->view->allBugs = $allBugs; diff --git a/module/kanban/model.php b/module/kanban/model.php index c246cd74a1..36f43289d4 100644 --- a/module/kanban/model.php +++ b/module/kanban/model.php @@ -2740,7 +2740,7 @@ class kanbanModel extends model } elseif($laneType == 'bug') { - $bugs = $this->loadModel('bug')->getExecutionBugs($executionID, 0, 0, '', 0, 'id_desc', $otherCardList); + $bugs = $this->loadModel('bug')->getExecutionBugs($executionID, 0, 'all', 0, '', 0, 'id_desc', $otherCardList); foreach($bugs as $bugID => $bug) { foreach($this->config->kanban->bugColumnStatusList as $colType => $status)