* adjust for add task estimate when start task.
This commit is contained in:
@@ -511,11 +511,6 @@ class taskModel extends model
|
||||
$task->status = 'doing';
|
||||
}
|
||||
|
||||
$this->dao->update(TABLE_TASK)->data($task)
|
||||
->autoCheck()
|
||||
->check('consumed,left', 'float')
|
||||
->where('id')->eq((int)$taskID)->exec();
|
||||
|
||||
/* Record consumed and left. */
|
||||
$estimate = fixer::input('post')
|
||||
->setDefault('account', $this->app->user->account)
|
||||
@@ -525,6 +520,11 @@ class taskModel extends model
|
||||
$estimate->consumed = $estimate->consumed - $oldTask->consumed;
|
||||
$this->addTaskEstimate($estimate);
|
||||
|
||||
$this->dao->update(TABLE_TASK)->data($task)
|
||||
->autoCheck()
|
||||
->check('consumed,left', 'float')
|
||||
->where('id')->eq((int)$taskID)->exec();
|
||||
|
||||
if($oldTask->story) $this->loadModel('story')->setStage($oldTask->story);
|
||||
if(!dao::isError()) return common::createChanges($oldTask, $task);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user