From d7f9d55863d8260a5b350cc759621739f8849318 Mon Sep 17 00:00:00 2001 From: liuhong Date: Tue, 15 Nov 2022 02:15:12 +0000 Subject: [PATCH 1/2] * Resolved feedback #1422. --- module/branch/model.php | 2 +- module/bug/model.php | 2 +- module/execution/control.php | 4 ++-- module/project/control.php | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/module/branch/model.php b/module/branch/model.php index dbf7fac873..47bbc4f4ed 100644 --- a/module/branch/model.php +++ b/module/branch/model.php @@ -126,7 +126,7 @@ class branchModel extends model if($executionID) { - if(isset($executionBranches['0'])) $branches = array('0' => $this->lang->branch->main) + $branches; + $branches = array('0' => $this->lang->branch->main, 'all' => $this->lang->branch->all) + $branches; return $branches; } diff --git a/module/bug/model.php b/module/bug/model.php index 5adc9e0c4a..e575b4daa3 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -1869,7 +1869,7 @@ class bugModel extends model ->where('t1.deleted')->eq(0) ->beginIF(empty($build))->andWhere('t1.project')->eq($projectID)->fi() ->beginIF(!empty($productID))->andWhere('t1.product')->eq($productID)->fi() - ->beginIF(!empty($productID))->andWhere('t1.branch')->eq($branchID)->fi() + ->beginIF(!empty($productID) and $branchID != 'all')->andWhere('t1.branch')->eq($branchID)->fi() ->beginIF($type == 'unresolved')->andWhere('t1.status')->eq('active')->fi() ->beginIF($type == 'noclosed')->andWhere('t1.status')->ne('closed')->fi() ->beginIF($type == 'assignedtome')->andWhere('t1.assignedTo')->eq($this->app->user->account)->fi() diff --git a/module/execution/control.php b/module/execution/control.php index 6d0e3736eb..398661693c 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -998,7 +998,7 @@ class execution extends control * @access public * @return void */ - public function bug($executionID = 0, $productID = 0, $branch = 0, $orderBy = 'status,id_desc', $build = 0, $type = 'all', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1) + public function bug($executionID = 0, $productID = 0, $branch = 'all', $orderBy = 'status,id_desc', $build = 0, $type = 'all', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1) { /* Load these two models. */ $this->loadModel('bug'); @@ -1165,7 +1165,7 @@ class execution extends control * @access public * @return void */ - public function testcase($executionID = 0, $productID = 0, $branchID = 0, $type = 'all', $moduleID = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1) + public function testcase($executionID = 0, $productID = 0, $branchID = 'all', $type = 'all', $moduleID = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1) { $this->loadModel('testcase'); $this->loadModel('testtask'); diff --git a/module/project/control.php b/module/project/control.php index 0d712bdd9a..27d5313089 100755 --- a/module/project/control.php +++ b/module/project/control.php @@ -1148,7 +1148,7 @@ class project extends control * @access public * @return void */ - public function bug($projectID = 0, $productID = 0, $branchID = 0, $orderBy = 'status,id_desc', $build = 0, $type = 'all', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1) + public function bug($projectID = 0, $productID = 0, $branchID = 'all', $orderBy = 'status,id_desc', $build = 0, $type = 'all', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1) { /* Load these two models. */ $this->loadModel('bug'); @@ -1307,7 +1307,7 @@ class project extends control * @access public * @return void */ - public function testcase($projectID = 0, $productID = 0, $branch = 0, $browseType = 'all', $param = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1) + public function testcase($projectID = 0, $productID = 0, $branch = 'all', $browseType = 'all', $param = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1) { $this->loadModel('product'); $this->session->set('bugList', $this->app->getURI(true), 'project'); From 13c945cd073cc28af10bfb195334863e3136c2bc Mon Sep 17 00:00:00 2001 From: liuhong Date: Tue, 15 Nov 2022 08:26:11 +0000 Subject: [PATCH 2/2] * Adjust code feedback #1422. --- module/branch/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/branch/model.php b/module/branch/model.php index 47bbc4f4ed..5c62d826d8 100644 --- a/module/branch/model.php +++ b/module/branch/model.php @@ -126,7 +126,7 @@ class branchModel extends model if($executionID) { - $branches = array('0' => $this->lang->branch->main, 'all' => $this->lang->branch->all) + $branches; + $branches = array('all' => $this->lang->branch->all, '0' => $this->lang->branch->main) + $branches; return $branches; }