diff --git a/module/branch/control.php b/module/branch/control.php index fed3f32882..832bd4b0d3 100644 --- a/module/branch/control.php +++ b/module/branch/control.php @@ -211,7 +211,7 @@ class branch extends control public function ajaxGetDropMenu($productID, $branch, $module, $method, $extra = '') { parse_str($extra, $output); - $isQaModule = (strpos(',project,execution,', ",{$this->app->tab},") !== false and strpos(',bug,testcase,', ",$method,") !== false and !empty($productID)) ? true : false; + $isQaModule = (strpos(',project,execution,', ",{$this->app->tab},") !== false and strpos(',bug,testcase,groupCase,zeroCase,', ",$method,") !== false and !empty($productID)) ? true : false; $param = $isQaModule ? $extra : 0; $param = isset($output['projectID']) ? $output['projectID'] : $param; $branches = $this->branch->getPairs($productID, 'all', $param); diff --git a/module/product/model.php b/module/product/model.php index ada143a2d9..8523500b68 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -101,7 +101,7 @@ class productModel extends model if($isQaModule and $this->app->tab == 'project') { - if($this->app->tab == 'project') $extra = $currentMethod == 'testcase' ? $extra : $this->session->project; + if($this->app->tab == 'project') $extra = strpos(',testcase,groupCase,zeroCase,', ",$currentMethod,") !== false ? $extra : $this->session->project; if($this->app->tab == 'execution') $extra = $this->session->execution; } @@ -2346,9 +2346,13 @@ class productModel extends model } elseif($module == 'testcase' and in_array($method, array('groupCase', 'zeroCase')) and $this->app->tab == 'project') { - parse_str($extra, $output); - $projectID = isset($output['projectID']) ? $output['projectID'] : 0; - $link = helper::createLink($module, $method, "productID=%s&branch=" . ($branch ? "%s" : 'all') . "&groupBy=&projectID=$projectID") . "#app=project"; + $projectID = $extra; + if(strpos($extra, 'projecID') !== false) + { + parse_str($extra, $output); + $projectID = isset($output['projectID']) ? $output['projectID'] : 0; + } + $link = helper::createLink($module, $method, "productID=%s&branch=" . ($branch ? "%s" : 'all') . "&groupBy=&projectID=$projectID") . "#app=project"; } elseif($module == 'testcase' and $method == 'browse') { diff --git a/module/testcase/control.php b/module/testcase/control.php index fb93f34117..3dbec9c773 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -254,7 +254,7 @@ class testcase extends control if($this->app->tab == 'project') { $products = array('0' => $this->lang->product->all) + $this->product->getProducts($this->session->project, 'all', '', false); - if(!$product->shadow) $this->lang->modulePageNav = $this->product->select($products, $productID, 'testcase', 'groupCase', "projectID=$projectID", $branch); + if(!$product->shadow) $this->lang->modulePageNav = $this->product->select($products, $productID, 'testcase', 'groupCase', $projectID, $branch); } $this->session->set('caseList', $this->app->getURI(true), $this->app->tab); @@ -325,7 +325,7 @@ class testcase extends control $products = $this->product->getProducts($this->session->project, 'all', '', false); $productID = $this->product->saveState($productID, $products); $product = $this->product->getByID($productID); - if(!$product->shadow) $this->lang->modulePageNav = $this->product->select($products, $productID, 'testcase', 'zeroCase', "projectID=$projectID", $branchID); + if(!$product->shadow) $this->lang->modulePageNav = $this->product->select($products, $productID, 'testcase', 'zeroCase', $projectID, $branchID); } else {