Merge branch 'master' of http://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
@@ -457,7 +457,6 @@ class testtaskModel extends model
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_CASE)->where($query)
|
||||
->andWhere('id')->notIN($linkedCases)
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testtask != 'qa')->andWhere('project')->eq($this->session->PRJ)->fi()
|
||||
->andWhere('status')->ne('wait')
|
||||
->andWhere('type')->ne('unit')
|
||||
->beginIF($task->branch)->andWhere('branch')->in("0,$task->branch")->fi()
|
||||
@@ -967,8 +966,20 @@ class testtaskModel extends model
|
||||
$row->assignedTo = '';
|
||||
$row->status = 'wait';
|
||||
if($type == 'bybuild') $row->assignedTo = zget($assignedToPairs, $caseID, '');
|
||||
|
||||
$this->dao->replace(TABLE_TESTRUN)->data($row)->exec();
|
||||
|
||||
/* When the cases linked the testtask, the cases link to the project. */
|
||||
if($this->lang->navGroup->testtask != 'qa')
|
||||
{
|
||||
$lastOrder = (int)$this->dao->select('*')->from(TABLE_PROJECTCASE)->where('project')->eq($projectID)->orderBy('order_desc')->limit(1)->fetch('order');
|
||||
$data = new stdclass();
|
||||
$data->project = $this->session->PRJ;
|
||||
$data->product = $this->session->product;
|
||||
$data->case = $caseID;
|
||||
$data->version = 1;
|
||||
$data->order = ++ $lastOrder;
|
||||
$this->dao->replace(TABLE_PROJECTCASE)->data($data)->exec();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user