From 83724a370d9aebcc47d6fd8e126a93f8a6657cc7 Mon Sep 17 00:00:00 2001 From: zenggang Date: Tue, 30 Nov 2021 01:40:07 +0000 Subject: [PATCH 1/2] * Fix bug#16910,16850 --- module/mr/control.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/module/mr/control.php b/module/mr/control.php index 0b4fb97725..8bb691c685 100644 --- a/module/mr/control.php +++ b/module/mr/control.php @@ -586,7 +586,7 @@ class mr extends control $this->config->bug->search['style'] = 'simple'; $this->config->bug->search['params']['plan']['values'] = $this->loadModel('productplan')->getForProducts(array($productID => $productID)); $this->config->bug->search['params']['module']['values'] = $modules; - $this->config->bug->search['params']['project']['values'] = $this->product->getExecutionPairsByProduct($productID); + $this->config->bug->search['params']['execution']['values'] = $this->product->getExecutionPairsByProduct($productID); $this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getProductBuildPairs($productID, $branch = 0, $params = ''); $this->config->bug->search['params']['resolvedBuild']['values'] = $this->loadModel('build')->getProductBuildPairs($productID, $branch = 0, $params = ''); @@ -665,9 +665,10 @@ class mr extends control $modules = $this->loadModel('tree')->getOptionMenu($productID, $viewType = 'task'); /* Build search form. */ - $this->config->execution->search['actionURL'] = $this->createLink('mr', 'link', "$MRID=$MRID&type=task&orderBy=$orderBy&link=true¶m=" . helper::safe64Encode('&browseType=bySearch&queryID=myQueryID')); - $this->config->execution->search['queryID'] = $queryID; - $this->config->execution->search['params']['module']['values'] = $modules; + $this->config->execution->search['actionURL'] = $this->createLink('mr', 'link', "$MRID=$MRID&type=task&orderBy=$orderBy&link=true¶m=" . helper::safe64Encode('&browseType=bySearch&queryID=myQueryID')); + $this->config->execution->search['queryID'] = $queryID; + $this->config->execution->search['params']['module']['values'] = $modules; + $this->config->execution->search['params']['execution']['values'] = $this->product->getExecutionPairsByProduct($productID); $this->loadModel('search')->setSearchParams($this->config->execution->search); $MR = $this->mr->getByID($MRID); From 5bbcd0bc35b2330176f28947dd8d4888b4947079 Mon Sep 17 00:00:00 2001 From: zenggang Date: Tue, 30 Nov 2021 02:12:59 +0000 Subject: [PATCH 2/2] * Fix bug#16849 --- module/mr/control.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/mr/control.php b/module/mr/control.php index 8bb691c685..633d4fe5b0 100644 --- a/module/mr/control.php +++ b/module/mr/control.php @@ -591,13 +591,14 @@ class mr extends control $this->config->bug->search['params']['resolvedBuild']['values'] = $this->loadModel('build')->getProductBuildPairs($productID, $branch = 0, $params = ''); unset($this->config->bug->search['fields']['product']); - if($this->session->currentProductType == 'normal') + if($product->type == 'normal') { unset($this->config->bug->search['fields']['branch']); unset($this->config->bug->search['params']['branch']); } else { + $this->product->setMenu($productID, $branch); $this->config->bug->search['fields']['branch'] = $this->lang->product->branch; $branches = array('' => '') + $this->loadModel('branch')->getPairs($productID, 'noempty'); $this->config->bug->search['params']['branch']['values'] = $branches;