Initial Recurring Tasks Commit
Initial Recurring Tasks Commit No Locales Updated.
This commit is contained in:
@@ -89,7 +89,9 @@ class TaskStatus extends Base
|
||||
*/
|
||||
private function changeStatus($task_id, $status, $date_completed, $event)
|
||||
{
|
||||
if (! $this->taskFinder->exists($task_id)) {
|
||||
$task = $this->taskFinder->getById($task_id);
|
||||
|
||||
if (!$task['id']) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -107,6 +109,13 @@ class TaskStatus extends Base
|
||||
$event,
|
||||
new TaskEvent(array('task_id' => $task_id) + $this->taskFinder->getById($task_id))
|
||||
);
|
||||
|
||||
if ($status == Task::STATUS_CLOSED
|
||||
&& $task['recurrence_status'] == Task::RECURE_STATUS_PENDING
|
||||
&& $task['recurrence_trigger'] == Task::RECURE_TRIGGER_CLOSE)
|
||||
{
|
||||
$this->taskDuplication->createRecurrence($task_id);
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
||||
Reference in New Issue
Block a user