From cdb45a89252cb4e17cc535c3ebf2809879a7e7dd Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Fri, 21 Oct 2022 13:16:52 +0000 Subject: [PATCH 1/4] * Fix bug#28145. --- module/testcase/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/testcase/config.php b/module/testcase/config.php index 1243f70e7e..a38f9a1a78 100644 --- a/module/testcase/config.php +++ b/module/testcase/config.php @@ -32,7 +32,7 @@ $config->testcase->custom->createFields = $config->testcase->customCreateFi $config->testcase->custom->batchCreateFields = 'module,story,%s'; $config->testcase->custom->batchEditFields = 'branch,module,stage,status,pri,story'; -$config->testcase->excludeCheckFileds = ',pri,type,stage,needReview,'; +$config->testcase->excludeCheckFileds = ',pri,type,stage,needReview,story,'; global $lang; $config->testcase->search['module'] = 'testcase'; From 530f513af0f43fa48798ee65698e416a3c3cbc3f Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Fri, 21 Oct 2022 14:55:46 +0000 Subject: [PATCH 2/4] * Fix bug#26957. --- module/testcase/control.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/module/testcase/control.php b/module/testcase/control.php index 15f518d414..fb431e6e3a 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -1550,14 +1550,18 @@ class testcase extends control * Confirm story changes. * * @param int $caseID + * @param bool $reload * @access public * @return void */ - public function confirmStoryChange($caseID,$reload=true) + public function confirmStoryChange($caseID, $reload = true) { $case = $this->testcase->getById($caseID); - $this->dao->update(TABLE_CASE)->set('storyVersion')->eq($case->latestStoryVersion)->where('id')->eq($caseID)->exec(); - $this->loadModel('action')->create('case', $caseID, 'confirmed', '', $case->latestStoryVersion); + if($case->story) + { + $this->dao->update(TABLE_CASE)->set('storyVersion')->eq($case->latestStoryVersion)->where('id')->eq($caseID)->exec(); + $this->loadModel('action')->create('case', $caseID, 'confirmed', '', $case->latestStoryVersion); + } if($reload) return print(js::reload('parent')); } From 1a4bfe923e84b00f02422d6185e7a3f4b8089c94 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Fri, 21 Oct 2022 14:58:17 +0000 Subject: [PATCH 3/4] * Fix bug#26953. --- module/story/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/story/model.php b/module/story/model.php index 2abb5e2a5a..086de3e140 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -384,7 +384,7 @@ class storyModel extends model } } } - $this->setStage($storyID); + if(!defined('TUTORIAL')) $this->setStage($storyID); if(!dao::isError()) $this->loadModel('score')->create('story', 'create',$storyID); /* Callback the callable method to process the related data for object that is transfered to story. */ From 6731c7d6cbc206d871dea90a4e9afce4fa952b50 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Fri, 21 Oct 2022 15:40:36 +0000 Subject: [PATCH 4/4] * Fix bug#26119. --- module/product/model.php | 1 + 1 file changed, 1 insertion(+) diff --git a/module/product/model.php b/module/product/model.php index 9b9e565835..43dcab7bb0 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -644,6 +644,7 @@ class productModel extends model if($this->app->tab == 'qa' and strpos(',testsuite,testreport,testtask,', ",$currentModule,") === false) $isShowBranch = true; if($this->app->tab == 'qa' and $currentModule == 'testtask' and strpos(',create,edit,browseunits,importunitresult,unitcases,', ",$currentMethod,") === false) $isShowBranch = true; if($currentModule == 'testcase' and $currentMethod == 'showimport') $isShowBranch = false; + if($currentModule == 'release' and strpos(',browse,create,', $currentMethod) !== false) $isShowBranch = true; if($isShowBranch) { $this->lang->product->branch = sprintf($this->lang->product->branch, $this->lang->product->branchName[$currentProduct->type]);