diff --git a/module/bug/model.php b/module/bug/model.php index 55ba5696d3..9c8ddc3e04 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -2257,7 +2257,7 @@ class bugModel extends model $products = $this->session->product; preg_match('/`product` IN \((?P.+)\)/', $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) diff --git a/module/build/model.php b/module/build/model.php index 9debed159f..71b87ea7e5 100644 --- a/module/build/model.php +++ b/module/build/model.php @@ -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;