* Resolve feedback #1318.

This commit is contained in:
liuyongkai
2022-11-01 07:31:11 +00:00
parent b4fbb4f928
commit 9685f4b186
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -2257,7 +2257,7 @@ class bugModel extends model
$products = $this->session->product;
preg_match('/`product` IN \((?P<productIdList>.+)\)/', $this->reportCondition(), $matchs);
if(!empty($matchs) and isset($matchs['productIdList'])) $products = str_replace('\'', '', $matchs['productIdList']);
$builds = $this->loadModel('build')->getBuildPairs($products, $branch = 0, $params = '');
$builds = $this->loadModel('build')->getBuildPairs($products, $branch = 0, $params = 'hasDeleted');
/* Deal with the situation that a bug maybe associate more than one openedBuild. */
foreach($datas as $buildIDList => $data)
+3 -1
View File
@@ -231,7 +231,8 @@ class buildModel extends model
->leftJoin(TABLE_RELEASE)->alias('t3')->on('t1.id = t3.build')
->leftJoin(TABLE_BRANCH)->alias('t4')->on('t1.branch = t4.id')
->leftJoin(TABLE_PRODUCT)->alias('t5')->on('t1.product = t5.id')
->where('t1.deleted')->eq(0)
->where(1)->eq(1)
->beginIF(strpos($params, 'hasDeleted') === false)->andWhere('t1.deleted')->eq(0)->fi()
->beginIF($products)->andWhere('t1.product')->in($products)->fi()
->beginIF($objectType === 'execution' and $objectID)->andWhere('t1.execution')->eq($objectID)->fi()
->beginIF($objectType === 'project' and $objectID)->andWhere('t1.project')->eq($objectID)->fi()
@@ -245,6 +246,7 @@ class buildModel extends model
{
if(empty($build->releaseID) and (strpos($params, 'nodone') !== false) and ($build->objectStatus === 'done')) continue;
if((strpos($params, 'noterminate') !== false) and ($build->releaseStatus === 'terminate')) continue;
if($build->deleted == 1) $build->name .= ' (' . $this->lang->build->deleted . ')';
$branchName = $build->branchName ? $build->branchName : $this->lang->branch->main;
$builds[$key] = $build->name;