From 43583934fc3cce7c3eaa5289a4c41d1794097bb3 Mon Sep 17 00:00:00 2001 From: hufangzhou <746775970@qq.com> Date: Thu, 8 Apr 2021 17:26:59 +0800 Subject: [PATCH 1/5] * Fix bug #11451. --- module/qa/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/qa/config.php b/module/qa/config.php index 2077db491c..190923c1dc 100644 --- a/module/qa/config.php +++ b/module/qa/config.php @@ -1,3 +1,3 @@ qa->menuList = array('caselib', 'testreport', 'testsuite', 'testtask', 'testcase', 'bug', 'qa', 'automation'); -$config->qa->noDropMenuModule = array('qa', 'caselib', 'automation'); +$config->qa->noDropMenuModule = array('qa', 'caselib', 'automation', 'testsuite'); From 43515c3c470462fd72783f0bfdc9ba6f2c23ffdb Mon Sep 17 00:00:00 2001 From: hufangzhou <746775970@qq.com> Date: Fri, 9 Apr 2021 08:30:52 +0800 Subject: [PATCH 2/5] * Fix an error. --- module/execution/view/view.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/execution/view/view.html.php b/module/execution/view/view.html.php index fb16256c3a..03484348d4 100644 --- a/module/execution/view/view.html.php +++ b/module/execution/view/view.html.php @@ -132,7 +132,7 @@
- id", "  " . $lang->doc->createlib, '', "class='text-muted iframe' data-width='1000px'");?> + id", "  " . $lang->doc->createLib, '', "class='text-muted iframe' data-width='1000px'");?>
From 49dd13be6313ba993ce2675a919d243f276225e2 Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Fri, 9 Apr 2021 09:28:41 +0800 Subject: [PATCH 3/5] * Fix bug#11935. --- module/my/view/task.html.php | 1 - 1 file changed, 1 deletion(-) diff --git a/module/my/view/task.html.php b/module/my/view/task.html.php index 4698d73fe6..7288e2bf9d 100644 --- a/module/my/view/task.html.php +++ b/module/my/view/task.html.php @@ -148,7 +148,6 @@ parent > 0) echo '' . $this->lang->task->childrenAB . ' ';?> createLink('task', 'view', "taskID=$child->id", '', '', $child->project), $child->name, null, "style='color: $child->color' data-group='project'");?> - project, '');?> createLink('execution', 'task', "executionID=$child->project", '', '', $child->project), $child->executionName, '', "data-group='execution'");?> openedBy);?> From 3c72f70d36fc60eed9be63aae6e4ce268ef8bf48 Mon Sep 17 00:00:00 2001 From: leiyong <1549684884@qq.com> Date: Fri, 9 Apr 2021 05:16:19 +0300 Subject: [PATCH 4/5] * Finish task#37284. --- module/bug/control.php | 1 + module/bug/model.php | 16 ++++++++-------- module/bug/view/ajaxgetdropmenu.html.php | 4 ++-- module/execution/control.php | 13 +++++++++---- module/execution/view/bug.html.php | 10 +++++++--- module/product/model.php | 20 +++++++++++++------- module/project/control.php | 23 ++++++++++++++--------- module/project/view/bug.html.php | 10 +++++++--- 8 files changed, 61 insertions(+), 36 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index 2ec9e5621a..9429fc46e0 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -1871,6 +1871,7 @@ class bug extends control * @param string $module * @param string $method * @param string $extra + * @param string $from * @access public * @return void */ diff --git a/module/bug/model.php b/module/bug/model.php index 60c59bd741..66a68612ff 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -1401,6 +1401,7 @@ class bugModel extends model * Get bugs of a project. * * @param int $projectID + * @param int $productID * @param int $build * @param string $type * @param int $param @@ -1410,14 +1411,12 @@ class bugModel extends model * @access public * @return array */ - public function getProjectBugs($projectID, $build = 0, $type = '', $param = 0, $orderBy = 'id_desc', $excludeBugs = '', $pager = null) + public function getProjectBugs($projectID, $productID = 0, $build = 0, $type = '', $param = 0, $orderBy = 'id_desc', $excludeBugs = '', $pager = null) { $type = strtolower($type); if($type == 'bysearch') { - $queryID = (int)$param; - $products = $this->loadModel('project')->getProducts($projectID); - + $queryID = (int)$param; if($this->session->projectBugQuery == false) $this->session->set('projectBugQuery', ' 1 = 1'); if($queryID) { @@ -1450,6 +1449,7 @@ class bugModel extends model $bugs = $this->dao->select('*')->from(TABLE_BUG) ->where('deleted')->eq(0) ->beginIF(empty($build))->andWhere('project')->eq($projectID)->fi() + ->beginIF(!empty($productID))->andWhere('product')->eq($productID)->fi() ->beginIF($type == 'unresolved')->andWhere('status')->eq('active')->fi() ->beginIF($type == 'noclosed')->andWhere('status')->ne('closed')->fi() ->beginIF($build)->andWhere("CONCAT(',', openedBuild, ',') like '%,$build,%'")->fi() @@ -1466,6 +1466,7 @@ class bugModel extends model * Get bugs of a execution. * * @param int $executionID + * @param int $productID * @param int $build * @param string $type * @param int $param @@ -1475,14 +1476,12 @@ class bugModel extends model * @access public * @return array */ - public function getExecutionBugs($executionID, $build = 0, $type = '', $param = 0, $orderBy = 'id_desc', $excludeBugs = '', $pager = null) + public function getExecutionBugs($executionID, $productID = 0, $build = 0, $type = '', $param = 0, $orderBy = 'id_desc', $excludeBugs = '', $pager = null) { $type = strtolower($type); if($type == 'bysearch') { - $queryID = (int)$param; - $products = $this->loadModel('execution')->getProducts($executionID); - + $queryID = (int)$param; if($this->session->executionBugQuery == false) $this->session->set('executionBugQuery', ' 1 = 1'); if($queryID) { @@ -1515,6 +1514,7 @@ class bugModel extends model $bugs = $this->dao->select('*')->from(TABLE_BUG) ->where('deleted')->eq(0) ->beginIF(empty($build))->andWhere('execution')->eq($executionID)->fi() + ->beginIF(!empty($productID))->andWhere('product')->eq($productID)->fi() ->beginIF($type == 'unresolved')->andWhere('status')->eq('active')->fi() ->beginIF($type == 'noclosed')->andWhere('status')->ne('closed')->fi() ->beginIF($build)->andWhere("CONCAT(',', openedBuild, ',') like '%,$build,%'")->fi() diff --git a/module/bug/view/ajaxgetdropmenu.html.php b/module/bug/view/ajaxgetdropmenu.html.php index f33d53c8d8..885f778050 100644 --- a/module/bug/view/ajaxgetdropmenu.html.php +++ b/module/bug/view/ajaxgetdropmenu.html.php @@ -17,7 +17,7 @@ foreach($products as $product) } $productsPinYin = common::convert2Pinyin($productNames); $linkHtml = $this->product->setParamsForLink($module, $link, $projectID, 0); -$productsHtml = html::a($linkHtml, $this->lang->bug->allProduct, '', "class='text-important' title='{$this->lang->bug->allProduct}' data-key='" . zget($productsPinYin, $this->lang->bug->allProduct, '') . "' data-group='project'"); +$productsHtml = html::a($linkHtml, $this->lang->bug->allProduct, '', "class='text-important' title='{$this->lang->bug->allProduct}' data-key='" . zget($productsPinYin, $this->lang->bug->allProduct, '') . "' data-app='{$this->app->openApp}'"); foreach($products as $product) { @@ -26,7 +26,7 @@ foreach($products as $product) $productName .= $product->line ? zget($lines, $product->line, '') . '/' . $product->name : $product->name; $objectID = ($product->type != 'platform' && $module == 'branch' && $method == 'manage') ? $productID : $product->id; $linkHtml = $this->product->setParamsForLink($module, $link, $projectID, $product->id); - $productsHtml .= html::a($linkHtml, $productName, '', "class='text-important $selected' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-group='project'"); + $productsHtml .= html::a($linkHtml, $productName, '', "class='text-important $selected' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='{$this->app->openApp}'"); } ?>
diff --git a/module/execution/control.php b/module/execution/control.php index eefcebe26a..47a1c84dbe 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -836,6 +836,7 @@ class execution extends control * Browse bugs of a execution. * * @param int $executionID + * @param int $productID * @param string $orderBy * @param int $build * @param string $type @@ -846,11 +847,12 @@ class execution extends control * @access public * @return void */ - public function bug($executionID = 0, $orderBy = 'status,id_desc', $build = 0, $type = 'all', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1) + public function bug($executionID = 0, $productID = 0, $orderBy = 'status,id_desc', $build = 0, $type = 'all', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1) { /* Load these two models. */ $this->loadModel('bug'); $this->loadModel('user'); + $this->loadModel('product'); /* Save session. */ $this->session->set('bugList', $this->app->getURI(true), 'execution'); @@ -860,9 +862,12 @@ class execution extends control $execution = $this->commonAction($executionID); $executionID = $execution->id; $products = $this->execution->getProducts($execution->id); - $productID = key($products); // Get the first product for creating bug. $branchID = isset($products[$productID]) ? $products[$productID]->branch : 0; + $productPairs = array('0' => $this->lang->product->all); + foreach($products as $product) $productPairs[$product->id] = $product->name; + $this->lang->modulePageNav = $this->product->select($productPairs, $productID, 'execution', 'bug', '', $branchID); + /* Header and position. */ $title = $execution->name . $this->lang->colon . $this->lang->execution->bug; $position[] = html::a($this->createLink('execution', 'browse', "executionID=$executionID"), $execution->name); @@ -872,7 +877,7 @@ class execution extends control $this->app->loadClass('pager', $static = true); $pager = new pager($recTotal, $recPerPage, $pageID); $sort = $this->loadModel('common')->appendOrder($orderBy); - $bugs = $this->bug->getExecutionBugs($executionID, $build, $type, $param, $sort, '', $pager); + $bugs = $this->bug->getExecutionBugs($executionID, $productID, $build, $type, $param, $sort, '', $pager); $users = $this->user->getPairs('noletter'); /* team member pairs. */ @@ -884,7 +889,7 @@ class execution extends control } /* Build the search form. */ - $actionURL = $this->createLink('execution', 'bug', "executionID=$executionID&orderBy=$orderBy&build=$build&type=bysearch&queryID=myQueryID"); + $actionURL = $this->createLink('execution', 'bug', "executionID=$executionID&productID=$productID&orderBy=$orderBy&build=$build&type=bysearch&queryID=myQueryID"); $this->execution->buildBugSearchForm($products, $queryID, $actionURL); /* Assign. */ diff --git a/module/execution/view/bug.html.php b/module/execution/view/bug.html.php index 1b949f4e1a..7029cc9ab7 100644 --- a/module/execution/view/bug.html.php +++ b/module/execution/view/bug.html.php @@ -11,12 +11,16 @@ */ ?> +