Merge branch 'master_xieqiyu_fixbug' into 'master'
* Fix bug#28145. See merge request easycorp/zentaopms!5855
This commit is contained in:
@@ -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]);
|
||||
|
||||
@@ -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. */
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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'));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user