* adjust linkCase.
This commit is contained in:
@@ -653,7 +653,7 @@ class testtask extends control
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->testtask->linkCase($taskID);
|
||||
$this->testtask->linkCase($taskID, $type);
|
||||
$this->locate(inlink('cases', "taskID=$taskID"));
|
||||
}
|
||||
|
||||
|
||||
@@ -582,11 +582,12 @@ class testtaskModel extends model
|
||||
/**
|
||||
* Link cases.
|
||||
*
|
||||
* @param int $taskID
|
||||
* @param int $taskID
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function linkCase($taskID)
|
||||
public function linkCase($taskID, $type)
|
||||
{
|
||||
if($this->post->cases == false) return;
|
||||
$postData = fixer::input('post')->get();
|
||||
@@ -598,6 +599,13 @@ class testtaskModel extends model
|
||||
$row->version = $postData->versions[$caseID];
|
||||
$row->assignedTo = '';
|
||||
$row->status = 'wait';
|
||||
|
||||
if($type == 'bybuild')
|
||||
{
|
||||
$assignedTo = $this->dao->select('assignedTo')->from(TABLE_TESTRUN)->where('`case`')->eq($caseID)->fetch();
|
||||
$row->assignedTo = $assignedTo->assignedTo;
|
||||
}
|
||||
|
||||
$this->dao->replace(TABLE_TESTRUN)->data($row)->exec();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user