* Fix bug #22585.
This commit is contained in:
@@ -62,6 +62,8 @@ class testcaseModel extends model
|
||||
$result = $this->loadModel('common')->removeDuplicate('case', $case, $param);
|
||||
if($result and $result['stop']) return array('status' => 'exists', 'id' => $result['duplicate']);
|
||||
|
||||
if(empty($case->product)) $this->config->testcase->create->requiredFields = str_replace('story', '', $this->config->testcase->create->requiredFields);
|
||||
|
||||
/* Value of story may be showmore. */
|
||||
$case->story = (int)$case->story;
|
||||
$this->dao->insert(TABLE_CASE)->data($case)->autoCheck()->batchCheck($this->config->testcase->create->requiredFields, 'notempty')->checkFlow()->exec();
|
||||
@@ -729,6 +731,7 @@ class testcaseModel extends model
|
||||
->get();
|
||||
|
||||
$requiredFields = $this->config->testcase->edit->requiredFields;
|
||||
|
||||
if($oldCase->lib != 0)
|
||||
{
|
||||
/* Remove the require field named story when the case is a lib case.*/
|
||||
@@ -975,6 +978,8 @@ class testcaseModel extends model
|
||||
unset($case);
|
||||
}
|
||||
|
||||
if(empty($case->product)) $this->config->testcase->edit->requiredFields = str_replace('story', '', $this->config->testcase->edit->requiredFields);
|
||||
|
||||
/* Update cases. */
|
||||
$this->loadModel('action');
|
||||
foreach($cases as $caseID => $case)
|
||||
|
||||
Reference in New Issue
Block a user