From 7e225ce3f71d2d6ed7709e12b3d7ed440c72eedc Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 30 Nov 2021 09:18:05 +0800 Subject: [PATCH] * Finish task #45081,45012. --- module/bug/model.php | 4 ++-- module/execution/view/manageproducts.html.php | 2 +- module/project/view/manageproducts.html.php | 2 +- module/release/control.php | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/module/bug/model.php b/module/bug/model.php index 0286b8e7c6..9fa20e91d3 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -1602,7 +1602,7 @@ class bugModel extends model * @access public * @return array */ - public function getProductLeftBugs($build, $productID, $branch = 0, $linkedBugs = '', $pager = null) + public function getProductLeftBugs($build, $productID, $branch = '', $linkedBugs = '', $pager = null) { $build = $this->dao->select('*')->from(TABLE_BUILD)->where('id')->eq($build)->fetch(); if(empty($build->execution)) return array(); @@ -1625,7 +1625,7 @@ class bugModel extends model ->andWhere("(status = 'active' OR resolvedDate > '{$execution->end}')") ->andWhere('openedBuild')->notin($beforeBuilds) ->beginIF($linkedBugs)->andWhere('id')->notIN($linkedBugs)->fi() - ->beginIF($branch)->andWhere('branch')->in("0,$branch")->fi() + ->beginIF($branch !== '')->andWhere('branch')->in("0,$branch")->fi() ->page($pager) ->fetchAll(); diff --git a/module/execution/view/manageproducts.html.php b/module/execution/view/manageproducts.html.php index d8a541e052..433deed8dd 100644 --- a/module/execution/view/manageproducts.html.php +++ b/module/execution/view/manageproducts.html.php @@ -38,7 +38,7 @@ ";?> - + diff --git a/module/project/view/manageproducts.html.php b/module/project/view/manageproducts.html.php index 6611b6a6fe..e4b6ca5b82 100644 --- a/module/project/view/manageproducts.html.php +++ b/module/project/view/manageproducts.html.php @@ -37,7 +37,7 @@ ";?> - + diff --git a/module/release/control.php b/module/release/control.php index cb129661fb..76bce38036 100644 --- a/module/release/control.php +++ b/module/release/control.php @@ -438,7 +438,7 @@ class release extends control if($browseType == 'bySearch' or $build->execution == 0) { - $allStories = $this->story->getBySearch($release->product, $release->branch, $queryID, 'id', $build->execution ? $build->execution : '', 'story', $release->stories, $pager); + $allStories = $this->story->getBySearch($release->product, "0,{$release->branch}", $queryID, 'id', $build->execution ? $build->execution : '', 'story', $release->stories, $pager); } else { @@ -558,7 +558,7 @@ class release extends control $allBugs = array(); $releaseBugs = $type == 'bug' ? $release->bugs : $release->leftBugs; - if($browseType == 'bySearch') + if($browseType == 'bySearch' or $build->execution == 0) { $allBugs = $this->bug->getBySearch($release->product, $release->branch, $queryID, 'id_desc', $releaseBugs, $pager); }