diff --git a/nag/lib/Driver.php b/nag/lib/Driver.php index c9a85d6f5e1..18218fb27d9 100644 --- a/nag/lib/Driver.php +++ b/nag/lib/Driver.php @@ -217,6 +217,7 @@ public function modify($taskId, array $properties) * because this might be a recurring task, and marking the * task complete might only shift the due date to the next * recurrence. */ + $task_completed = $task->completed; if (isset($properties['completed']) && $properties['completed'] != $task->completed) { if (isset($properties['recurrence'])) { @@ -237,6 +238,10 @@ public function modify($taskId, array $properties) $this->_modify($taskId, array_merge($task->toHash(), $properties)); + // Must persist the original completed value so we can detect the + // change when notifications are sent. + $task->completed = $task_completed; + $new_task = $this->get($task->id); $log_tasklist = $this->_tasklist; if (isset($properties['tasklist']) &&