From 5042f1de90247fe3566adfd3a393cde7d62fa3b8 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Fri, 27 Aug 2021 15:13:45 +0800 Subject: [PATCH 1/3] * Fix bug #14731. --- module/story/model.php | 1 + 1 file changed, 1 insertion(+) diff --git a/module/story/model.php b/module/story/model.php index 4fe5b9df0a..17cdcff01c 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -1324,6 +1324,7 @@ class storyModel extends model { $oldStory = $oldStories[$storyID]; if($oldStory->status != 'draft' and $oldStory->status != 'changed') continue; + if(!in_array($this->app->user->account, array_keys($reviewerList[$storyID]))) continue; if(isset($hasResult[$storyID])) continue; $story = new stdClass(); From ad66c56b0ac801803f8447ca1d7d3dde8a29b115 Mon Sep 17 00:00:00 2001 From: zenggang Date: Fri, 27 Aug 2021 15:19:52 +0800 Subject: [PATCH 2/3] * Finish task#41691 --- module/build/control.php | 2 +- module/testtask/js/common.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/module/build/control.php b/module/build/control.php index 55f08f80c2..6856719a12 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -38,7 +38,7 @@ class build extends control $this->executeHooks($buildID); if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $buildID)); - if(isonlybody()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => "parent.loadExecutionBuilds($executionID)")); // Code for task #5126. + if(isonlybody()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => "parent.loadExecutionBuilds($executionID, $buildID)")); // Code for task #5126. return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('build', 'view', "buildID=$buildID"))); } diff --git a/module/testtask/js/common.js b/module/testtask/js/common.js index 848fe6be67..f3fde3fd0d 100644 --- a/module/testtask/js/common.js +++ b/module/testtask/js/common.js @@ -81,7 +81,7 @@ function loadExecutionRelated(executionID) * @access public * @return void */ -function loadExecutionBuilds(executionID) +function loadExecutionBuilds(executionID, selected) { selectedBuild = $('#build').val(); if(!selectedBuild) selectedBuild = 0; @@ -90,6 +90,7 @@ function loadExecutionBuilds(executionID) $('#buildBox').load(link, function() { $('#resolvedBuild').attr('id', 'build').attr('name', 'build').find('option[value=trunk]').remove(); + if(selected) $('#build').val(selected); $('#build').chosen(); }); } From 5f740be96bed3555caed44e62e5c870e2c77b371 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Fri, 27 Aug 2021 15:24:32 +0800 Subject: [PATCH 3/3] * Modify the test case back link problem. --- module/bug/view/create.html.php | 3 ++- module/execution/control.php | 4 +++- module/project/control.php | 1 + module/testcase/control.php | 6 +++++- module/testcase/view/view.html.php | 1 + module/testtask/js/common.js | 9 ++++++++- module/testtask/view/results.html.php | 1 + module/testtask/view/runcase.html.php | 1 + 8 files changed, 22 insertions(+), 4 deletions(-) diff --git a/module/bug/view/create.html.php b/module/bug/view/create.html.php index a742898300..3b4ffefa0b 100644 --- a/module/bug/view/create.html.php +++ b/module/bug/view/create.html.php @@ -325,8 +325,9 @@ js::set('moduleID', $moduleID); + session->bugList ? $this->session->bugList : $this->inlink('browse', "productID=$productID");?> - + goback, $browseLink, 'self', '', 'btn btn-wide');?> id);?> diff --git a/module/execution/control.php b/module/execution/control.php index adaa6da8d5..e699a78669 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -926,7 +926,9 @@ class execution extends control $this->loadModel('testcase'); $this->loadModel('testtask'); $this->commonAction($executionID); - $this->session->set('caseList', $this->app->getURI(true), 'execution'); + $uri = $this->app->getURI(true); + $this->session->set('caseList', $uri, 'execution'); + $this->session->set('bugList', $uri, 'execution'); $products = $this->execution->getProducts($executionID); $productID = key($products); // Get the first product for creating testcase. diff --git a/module/project/control.php b/module/project/control.php index 8c4c1ce4e0..37532ed079 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -921,6 +921,7 @@ class project extends control public function testcase($projectID = 0, $productID = 0, $branch = 0, $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'); $products = array('0' => $this->lang->product->all) + $this->project->getProducts($projectID, false); $this->lang->modulePageNav = $this->product->select($products, $productID, 'project', 'testcase', '', $branch, 0, '', false); diff --git a/module/testcase/control.php b/module/testcase/control.php index b6cd44016e..a6c288c34e 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -132,7 +132,9 @@ class testcase extends control $this->qa->setMenu($this->products, $productID, $branch); } - $this->session->set('caseList', $this->app->getURI(true), $this->app->openApp); + $uri = $this->app->getURI(true); + $this->session->set('caseList', $uri, $this->app->openApp); + $this->session->set('bugList', $uri, $this->app->openApp); $this->session->set('productID', $productID); $this->session->set('moduleID', $moduleID); $this->session->set('browseType', $browseType); @@ -598,6 +600,8 @@ class testcase extends control */ public function view($caseID, $version = 0, $from = 'testcase', $taskID = 0) { + $this->session->set('bugList', $this->app->getURI(true), $this->app->openApp); + $caseID = (int)$caseID; $case = $this->testcase->getById($caseID, $version); if(!$case) diff --git a/module/testcase/view/view.html.php b/module/testcase/view/view.html.php index 88905d038a..79f5c05a5d 100644 --- a/module/testcase/view/view.html.php +++ b/module/testcase/view/view.html.php @@ -14,6 +14,7 @@ session->caseList ? $app->session->caseList : $this->createLink('testcase', 'browse', "productID=$case->product");?> +openApp);?>