diff --git a/module/task/model.php b/module/task/model.php index ec34c23a50..6c244028a3 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -966,15 +966,15 @@ class taskModel extends model if($left != 0 || $task->assignedTo != $teams[count($teams) - 1]) { $newTask->status = 'doing'; - if($task->assignedTo != $teams[count($teams) - 1] && $left == 0) + if($left == 0) { $newTask->assignedTo = $this->getNextUser($teams, $task->assignedTo); $newTask->assignedDate = $now; } - $task->status = $oldStatus; $this->dao->update(TABLE_TASK)->data($newTask)->where('id')->eq((int)$taskID)->exec(); + $task->status = $oldStatus; $changes = common::createChanges($task, $newTask); if(!empty($actionID)) $this->action->logHistory($actionID, $changes); return $changes;