@@ -166,6 +166,10 @@ class story extends control
|
||||
}
|
||||
$actionID = $this->action->create('story', $storyID, $action, '', $extra);
|
||||
|
||||
/* Record submit review action. */
|
||||
$story = $this->dao->findById((int)$storyID)->from(TABLE_STORY)->fetch();
|
||||
if($story->status == 'reviewing') $this->action->create('story', $storyID, 'submitReview');
|
||||
|
||||
if($objectID != 0)
|
||||
{
|
||||
$object = $this->dao->findById((int)$objectID)->from(TABLE_PROJECT)->fetch();
|
||||
@@ -1153,6 +1157,10 @@ class story extends control
|
||||
$action = !empty($changes) ? 'Changed' : 'Commented';
|
||||
$actionID = $this->action->create('story', $storyID, $action, $this->post->comment);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
|
||||
/* Record submit review action. */
|
||||
$story = $this->dao->findById((int)$storyID)->from(TABLE_STORY)->fetch();
|
||||
if($story->status == 'reviewing') $this->action->create('story', $storyID, 'submitReview');
|
||||
}
|
||||
|
||||
$this->executeHooks($storyID);
|
||||
|
||||
@@ -409,6 +409,7 @@ class testcase extends control
|
||||
|
||||
$this->loadModel('action');
|
||||
$this->action->create('case', $caseID, 'Opened');
|
||||
if($this->testcase->getStatus('create') == 'wait') $this->action->create('case', $caseID, 'submitReview');
|
||||
|
||||
/* If the story is linked project, make the case link the project. */
|
||||
$this->testcase->syncCase2Project($caseResult['caseInfo'], $caseID);
|
||||
@@ -858,6 +859,9 @@ class testcase extends control
|
||||
{
|
||||
$this->loadModel('story');
|
||||
|
||||
$case = $this->testcase->getById($caseID);
|
||||
if(!$case) return print(js::error($this->lang->notFound) . js::locate('back'));
|
||||
|
||||
$testtasks = $this->loadModel('testtask')->getGroupByCases($caseID);
|
||||
$testtasks = empty($testtasks[$caseID]) ? array() : $testtasks[$caseID];
|
||||
|
||||
@@ -875,6 +879,8 @@ class testcase extends control
|
||||
$action = !empty($changes) ? 'Edited' : 'Commented';
|
||||
$actionID = $this->action->create('case', $caseID, $action, $this->post->comment);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
|
||||
if($case->status != 'wait' and $this->post->status == 'wait') $this->action->create('case', $caseID, 'submitReview');
|
||||
}
|
||||
|
||||
$this->executeHooks($caseID);
|
||||
@@ -889,8 +895,6 @@ class testcase extends control
|
||||
}
|
||||
}
|
||||
|
||||
$case = $this->testcase->getById($caseID);
|
||||
if(!$case) return print(js::error($this->lang->notFound) . js::locate('back'));
|
||||
if($case->auto == 'unit')
|
||||
{
|
||||
$this->lang->testcase->subMenu->testcase->feature['alias'] = '';
|
||||
|
||||
@@ -61,7 +61,6 @@ class testcaseModel extends model
|
||||
->setIF($this->app->tab == 'project', 'project', $this->session->project)
|
||||
->setIF($this->app->tab == 'execution', 'execution', $this->session->execution)
|
||||
->setIF($this->post->story != false, 'storyVersion', $this->loadModel('story')->getVersion((int)$this->post->story))
|
||||
->stripTags($this->config->testcase->editor->create['id'], $this->config->allowedTags)
|
||||
->remove('steps,expects,files,labels,stepType,forceNotReview')
|
||||
->setDefault('story', 0)
|
||||
->cleanInt('story,product,branch,module')
|
||||
@@ -78,7 +77,6 @@ class testcaseModel extends model
|
||||
|
||||
/* Value of story may be showmore. */
|
||||
$case->story = (int)$case->story;
|
||||
$case = $this->loadModel('file')->processImgURL($case, $this->config->testcase->editor->create['id'], $this->post->uid);
|
||||
$this->dao->insert(TABLE_CASE)->data($case)->autoCheck()->batchCheck($this->config->testcase->create->requiredFields, 'notempty')->checkFlow()->exec();
|
||||
if(!$this->dao->isError())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user