This commit is contained in:
liyuchun
2022-03-22 14:12:44 +08:00
parent e91bf2520c
commit 166cda1186
4 changed files with 6 additions and 3 deletions

View File

@@ -59,7 +59,8 @@ class bug extends control
}
else
{
$products = $this->product->getPairs('', 0, 'program_asc');
$mode = ($this->app->methodName == 'create' and empty($this->config->CRProduct)) ? 'noclosed' : '';
$products = $this->product->getPairs($mode, 0, 'program_asc');
}
if(empty($products) and !helper::isAjaxRequest()) return print($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$tab&activeMenu=bug&objectID=$objectID")));
}

View File

@@ -989,7 +989,7 @@ class product extends control
if($execution->type == 'kanban') $projectID = $execution->project;
}
$executions = $this->product->getExecutionPairsByProduct($productID, $branch, 'id_desc', $projectID);
$executions = $this->product->getExecutionPairsByProduct($productID, $branch, 'id_desc', $projectID, empty($this->config->CRExecution) ? 'noclosed' : '');
if($this->app->getViewType() == 'json') return print(json_encode($executions));
if($number === '')

View File

@@ -1184,6 +1184,7 @@ class productModel extends model
->andWhere('t2.project')->eq($projectID)
->beginIF($branch !== '')->andWhere('t1.branch')->in($branch)->fi()
->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->sprints)->fi()
->beginIF(strpos($mode, 'noclosed') !== false)->andWhere('t2.status')->ne('closed')->fi()
->andWhere('t2.deleted')->eq('0')
->orderBy($orderBy)
->fetchAll('id');

View File

@@ -59,7 +59,8 @@ class testcase extends control
}
else
{
$products = $this->product->getPairs();
$mode = ($this->app->methodName == 'create' and empty($this->config->CRProduct)) ? 'noclosed' : '';
$products = $this->product->getPairs($mode);
}
if(empty($products) and !helper::isAjaxRequest()) return print($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$tab&activeMenu=testcase&objectID=$objectID")));
}