Merge branch 'master_xieqiyu_30186' into 'master'
* Fix bug#30186. See merge request easycorp/zentaopms!6382
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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')
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user