* Adjust the code.

This commit is contained in:
hufangzhou
2021-02-25 14:57:26 +08:00
parent 29abbb19ab
commit 007296bd38
3 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -293,7 +293,7 @@ class buildModel extends model
->leftJoin(TABLE_RELEASE)->alias('t3')->on('t1.id = t3.build')
->leftJoin(TABLE_BRANCH)->alias('t4')->on('t1.branch = t4.id')
->where('t1.product')->in($products)
->andWhere('t1.PRJ')->eq($this->session->PRJ)
->beginIF($this->lang->navGroup->testtask != 'qa')->andWhere('t1.PRJ')->eq($this->session->PRJ)->fi()
->beginIF($branch)->andWhere('t1.branch')->in("0,$branch")->fi()
->andWhere('t1.deleted')->eq(0)
->orderBy('t1.date desc, t1.id desc')->fetchAll('id');
+3 -3
View File
@@ -275,7 +275,7 @@ class caselibModel extends model
{
$cases = $this->dao->select('*')->from(TABLE_CASE)
->where('lib')->eq((int)$libID)
->andWhere('PRJ')->eq($this->session->PRJ)
->beginIF($this->lang->navGroup->caselib != 'qa')->andWhere('PRJ')->eq($this->session->PRJ)->fi()
->andWhere('product')->eq(0)
->beginIF($moduleIdList)->andWhere('module')->in($moduleIdList)->fi()
->beginIF($browseType == 'wait')->andWhere('status')->eq($browseType)->fi()
@@ -312,7 +312,7 @@ class caselibModel extends model
$cases = $this->dao->select('*')->from(TABLE_CASE)->where($caseQuery)
->beginIF($queryLibID != 'all')->andWhere('lib')->eq((int)$libID)->fi()
->andWhere('PRJ')->eq($this->session->PRJ)
->beginIF($this->lang->navGroup->caselib != 'qa')->andWhere('PRJ')->eq($this->session->PRJ)->fi()
->andWhere('product')->eq(0)
->andWhere('deleted')->eq(0)
->orderBy($sort)->page($pager)->fetchAll();
@@ -627,7 +627,7 @@ class caselibModel extends model
$data[$i]->openedDate = $now;
$data[$i]->status = $forceNotReview ? 'normal' : 'wait';
$data[$i]->version = 1;
if($this->config->systemMode == 'new') $data[$i]->PRJ = $this->session->PRJ;
if($this->config->systemMode == 'new' and $this->lang->navGroup->caselib != 'qa') $data[$i]->PRJ = $this->session->PRJ;
$this->dao->insert(TABLE_CASE)->data($data[$i])
->autoCheck()
+2 -1
View File
@@ -175,7 +175,8 @@ class testtask extends control
/* Create testtask from testtask of test.*/
$productID = $productID ? $productID : key($this->products);
$projects = empty($productID) ? array() : $this->product->getExecutionPairsByProduct($productID);
$projectID = $this->lang->navGroup->testtask == 'project' ? $this->session->PRJ : 0;
$projects = empty($productID) ? array() : $this->product->getExecutionPairsByProduct($productID, 0, 'id_asc', $projectID);
$builds = empty($productID) ? array() : $this->loadModel('build')->getProductBuildPairs($productID, 0, 'notrunk', true);
/* Set menu. */