Merge branch 'sprint/170_songchenxuan_44490' into 'sprint/170'

Sprint/170 songchenxuan 44490

See merge request easycorp/zentaopms!501
This commit is contained in:
李玉春
2021-11-18 05:12:40 +00:00
2 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -207,7 +207,7 @@ class bug extends control
$showModule = !empty($this->config->datatable->bugBrowse->showModule) ? $this->config->datatable->bugBrowse->showModule : '';
$productName = ($productID and isset($this->products[$productID])) ? $this->products[$productID] : $this->lang->product->allProduct;
$product = $this->product->getById($productID);
if($product and $product->type != 'normal')
{
+6 -2
View File
@@ -227,6 +227,8 @@ class buildModel extends model
*/
public function getExecutionBuildPairs($executionID, $productID, $branch = 0, $params = '', $buildIdList = '')
{
$branch = str_replace('0,', '', $branch);
if($branch == 'all') $branch = 0;
$sysBuilds = array();
$selectedBuilds = array();
if(strpos($params, 'noempty') === false) $sysBuilds = array('' => '');
@@ -239,7 +241,7 @@ class buildModel extends model
->leftJoin(TABLE_BRANCH)->alias('t4')->on('t1.branch = t4.id')
->where('t1.execution')->eq((int)$executionID)
->beginIF($productID)->andWhere('t1.product')->eq((int)$productID)->fi()
->beginIF($branch)->andWhere('t1.branch')->in("0,$branch")->fi()
->andWhere('t1.branch')->eq($branch)->fi()
->andWhere('t1.deleted')->eq(0)
->orderBy('t1.date desc, t1.id desc')->fetchAll('id');
@@ -269,6 +271,8 @@ class buildModel extends model
*/
public function getProductBuildPairs($products, $branch = 0, $params = 'noterminate, nodone', $replace = true)
{
$branch = str_replace('0,', '', $branch);
if($branch == 'all') $branch = 0;
$sysBuilds = array();
if(strpos($params, 'noempty') === false) $sysBuilds = array('' => '');
if(strpos($params, 'notrunk') === false) $sysBuilds = $sysBuilds + array('trunk' => $this->lang->trunk);
@@ -278,7 +282,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)
->beginIF($branch)->andWhere('t1.branch')->in("0,$branch")->fi()
->andWhere('t1.branch')->eq($branch)->fi()
->andWhere('t1.deleted')->eq(0)
->orderBy('t1.date desc, t1.id desc')->fetchAll('id');