Merge branch 'sprint/174_mayue_16605' into 'master'

* Fix bug #16605.

See merge request easycorp/zentaopms!613
This commit is contained in:
李玉春
2021-11-25 01:55:23 +00:00
3 changed files with 7 additions and 4 deletions
+2 -1
View File
@@ -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);
+3 -2
View File
@@ -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)
{
+2 -1
View File
@@ -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)