Skip to content

Commit

Permalink
Bug: 13350 Fix detecting task completion when sending task change not…
Browse files Browse the repository at this point in the history
…ifications.

Signed-off-by: Michael J Rubinsky <mrubinsk@horde.org>
  • Loading branch information
almarin authored and mrubinsk committed Jul 12, 2014
1 parent 7f6009f commit 6a0acbc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nag/lib/Driver.php
Expand Up @@ -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'])) {
Expand All @@ -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']) &&
Expand Down

0 comments on commit 6a0acbc

Please sign in to comment.