Merge branch 'master_xieqiyu_fixbug' into 'master'

* Fix bug#28145.

See merge request easycorp/zentaopms!5855
This commit is contained in:
王怡栋
2022-10-21 07:58:16 +00:00
4 changed files with 10 additions and 5 deletions
+1
View File
@@ -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]);
+1 -1
View File
@@ -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. */
+1 -1
View File
@@ -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';
+7 -3
View File
@@ -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'));
}