diff --git a/module/branch/control.php b/module/branch/control.php index a83e5d950b..5a34c60190 100644 --- a/module/branch/control.php +++ b/module/branch/control.php @@ -205,7 +205,8 @@ class branch extends control */ public function ajaxGetDropMenu($productID, $branch = 0, $module, $method, $extra = '') { - $branches = $this->branch->getPairs($productID, 'all'); + $products = $this->loadModel('execution')->getBranchByProduct($productID, $extra, 'all'); + $branches = $products[$productID]; $statusList = $this->dao->select('id,status')->from(TABLE_BRANCH)->where('product')->eq($productID)->fetchPairs(); $this->view->link = $this->loadModel('product')->getProductLink($module, $method, $extra, true); diff --git a/module/execution/model.php b/module/execution/model.php index cd4dbeb8ec..34edb0bad6 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -1635,12 +1635,13 @@ class executionModel extends model * * @param array $products * @param int $projectID + * @param string $status * @access public * @return array */ - public function getBranchByProduct($products, $projectID = 0) + public function getBranchByProduct($products, $projectID = 0, $status = 'noclosed') { - $branchGroups = $this->loadModel('branch')->getByProducts($products, 'noclosed'); + $branchGroups = $this->loadModel('branch')->getByProducts($products, $status); if($projectID) { diff --git a/module/product/model.php b/module/product/model.php index 5b4b11f951..d55822bde7 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -75,7 +75,8 @@ class productModel extends model */ public function select($products, $productID, $currentModule, $currentMethod, $extra = '', $branch = '', $module = 0, $moduleType = '', $withBranch = true) { - $isBrowseBug = (strpos(',project,execution,', ",{$this->app->tab},") !== false and strpos(',bug,testcase,testtask,ajaxselectstory,', ",{$this->app->rawMethod},") !== false and isset($products[0])) ? true : false; + $browseBugMethod = ',bug,testcase,testtask,ajaxselectstory,groupcase,zerocase,browseunits,'; + $isBrowseBug = (strpos(',project,execution,', ",{$this->app->tab},") !== false and strpos($browseBugMethod, ",{$this->app->rawMethod},") !== false and isset($products)) ? true : false; $this->app->loadLang('product'); if(!$isBrowseBug and !$productID)