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]); 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. */ 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'; 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')); }