From aae0921d2397737f22c6cd2f2859a45e625cb5b1 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Mon, 22 Nov 2021 09:47:35 +0800 Subject: [PATCH 1/4] * Fix bug#16479. --- module/execution/js/common.js | 2 +- module/productplan/model.php | 15 --------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/module/execution/js/common.js b/module/execution/js/common.js index 5a71f3f02c..8368566eb0 100644 --- a/module/execution/js/common.js +++ b/module/execution/js/common.js @@ -178,7 +178,7 @@ function loadPlans(product, branchID) { if(typeof(planID) == 'undefined') planID = 0; planID = $("select#plans" + productID).val() != '' ? $("select#plans" + productID).val() : planID; - $.get(createLink('product', 'ajaxGetPlans', "productID=" + productID + '&branch=' + branchID + '&planID=' + planID + '&fieldID&needCreate=&expired=' + ((config.currentMethod == 'create' || config.currentMethod == 'edit') ? 'unexpired' : '')), function(data) + $.get(createLink('product', 'ajaxGetPlans', "productID=" + productID + '&branch=' + branchID + '&planID=' + planID), function(data) { if(data) { diff --git a/module/productplan/model.php b/module/productplan/model.php index b85440f470..10ae438b12 100644 --- a/module/productplan/model.php +++ b/module/productplan/model.php @@ -191,21 +191,6 @@ class productplanModel extends model ->orderBy('t1.begin desc') ->fetchAll('id'); - if($expired == 'unexpired') - { - $plans += $this->dao->select('t1.id,t1.title,t1.parent,t1.begin,t1.end,t2.name as branchName')->from(TABLE_PRODUCTPLAN)->alias('t1') - ->leftJoin(TABLE_BRANCH)->alias('t2')->on('t2.id=t1.branch') - ->where('t1.product')->in($product) - ->andWhere('t1.deleted')->eq(0) - ->andWhere('t1.end')->lt($date) - ->beginIF($branch)->andWhere("t1.branch")->in("0,$branch")->fi() - ->beginIF($plans)->andWhere("t1.id")->notIN(array_keys($plans))->fi() - ->beginIF($skipParent)->andWhere('t1.parent')->ne(-1)->fi() - ->orderBy('t1.begin desc') - ->limit(5) - ->fetchAll('id'); - } - $plans = $this->reorder4Children($plans); $planPairs = array(); $parentTitle = array(); From dee3dd3be012f2dcb470113d0d6adb59872ad0b9 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Mon, 22 Nov 2021 09:59:35 +0800 Subject: [PATCH 2/4] * Restore code. --- module/execution/js/common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/execution/js/common.js b/module/execution/js/common.js index 8368566eb0..5a71f3f02c 100644 --- a/module/execution/js/common.js +++ b/module/execution/js/common.js @@ -178,7 +178,7 @@ function loadPlans(product, branchID) { if(typeof(planID) == 'undefined') planID = 0; planID = $("select#plans" + productID).val() != '' ? $("select#plans" + productID).val() : planID; - $.get(createLink('product', 'ajaxGetPlans', "productID=" + productID + '&branch=' + branchID + '&planID=' + planID), function(data) + $.get(createLink('product', 'ajaxGetPlans', "productID=" + productID + '&branch=' + branchID + '&planID=' + planID + '&fieldID&needCreate=&expired=' + ((config.currentMethod == 'create' || config.currentMethod == 'edit') ? 'unexpired' : '')), function(data) { if(data) { From 13ae5b4d9a3dffdee7c043e0a489ffc292ed5a9a Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Mon, 22 Nov 2021 11:16:48 +0800 Subject: [PATCH 3/4] * Code for task#44503. --- module/bug/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/bug/model.php b/module/bug/model.php index 8542debbf5..5ab908f07d 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -1313,7 +1313,7 @@ class bugModel extends model $this->config->bug->search['params']['module']['values'] = $modules; $this->config->bug->search['params']['execution']['values'] = $this->loadModel('product')->getExecutionPairsByProduct($productID, 0, 'id_desc', $projectID); $this->config->bug->search['params']['severity']['values'] = array(0 => '') + $this->lang->bug->severityList; //Fix bug #939. - $this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getProductBuildPairs($productID, 0, 'withbranch'); + $this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getProductBuildPairs($productID, 'all', 'withbranch'); $this->config->bug->search['params']['resolvedBuild']['values'] = $this->config->bug->search['params']['openedBuild']['values']; if($this->session->currentProductType == 'normal') { From 0669e7385b2ffabd1a2345bba96bc55b6de1d550 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Mon, 22 Nov 2021 12:33:27 +0800 Subject: [PATCH 4/4] * Fix bug#16519. --- module/testcase/control.php | 13 +------------ module/testtask/view/cases.html.php | 2 +- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/module/testcase/control.php b/module/testcase/control.php index 1ef99605cf..2a3b9d1220 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -926,18 +926,7 @@ class testcase extends control if($product->type != 'normal') { $branches = $this->loadModel('branch')->getPairs($productID); - if($branch === 'all') - { - $modules[0] = $this->tree->getOptionMenu($productID, $viewType = 'case', 0, 0); - foreach($branches as $branchID => $branchName) - { - $modules[$branchID] = $this->tree->getOptionMenu($productID, $viewType = 'case', 0, $branchID); - } - } - else - { - $modules[$branch] = $this->tree->getOptionMenu($productID, $viewType = 'case', 0, $branch); - } + foreach($branches as $branchID => $branchName) $modules[$branchID] = $this->tree->getOptionMenu($productID, $viewType = 'case', 0, $branchID); } else { diff --git a/module/testtask/view/cases.html.php b/module/testtask/view/cases.html.php index b840310574..13e6b8a7e9 100644 --- a/module/testtask/view/cases.html.php +++ b/module/testtask/view/cases.html.php @@ -84,7 +84,7 @@
createLink('testcase', 'batchEdit', "productID=$productID"); + $actionLink = $this->createLink('testcase', 'batchEdit', "productID=$productID&branch=$task->branch"); $misc = $canBatchEdit ? "onclick=\"setFormAction('$actionLink')\"" : "disabled='disabled'"; echo html::commonButton($lang->edit, $misc); ?>