Skip to content

feat(nag): ActiveSync recurring task instance completion#31

Merged
TDannhauer merged 1 commit into
FRAMEWORK_6_0from
fix/activesync-recurring-task-completion
Jun 25, 2026
Merged

feat(nag): ActiveSync recurring task instance completion#31
TDannhauer merged 1 commit into
FRAMEWORK_6_0from
fix/activesync-recurring-task-completion

Conversation

@TDannhauer

Copy link
Copy Markdown
Contributor

Summary

  • Sync recurring task instance completion, un-completion, and series-master updates from ActiveSync clients (iOS, Outlook) to Nag without spawning duplicate rows
  • Guard getNextDue() null dereferences in the task detail view and portal Summary block
  • Add the missing Nag::isTaskViewFilter() helper used when building complete-link return URLs

Motivation

ActiveSync clients complete individual recurrence instances differently from the web UI. Nag previously created duplicate task rows or failed to persist per-instance completion state. The follow-up fixes address runtime errors introduced while wiring list-return URLs and next-due display for recurring tasks.

Changes

  • Nag_Task::fromASTask(): route dead-occurrence Adds and master Modifies to dedicated recurrence handlers; track completions[] instead of toggling series completion
  • Nag_Api::replace() / import(): resolve the series master for instance messages and merge dead-occurrence Adds into the master UID
  • Nag_Driver::modifyFromHash(): persist recurrence/completion state without toggleComplete() side effects
  • Preserve the total RRULE COUNT on master Modify (clients send the remaining-occurrence count, not the series total)
  • Guard null getNextDue() in templates/view/task.inc and lib/Block/Summary.php
  • Add Nag::isTaskViewFilter() for Nag::VIEW_* tab/filter validation in Nag_Task::process()

Test plan

  • vendor/bin/phpunit --bootstrap vendor/autoload.php vendor/horde/nag/test/Nag/Unit/Task/ActiveSyncRecurrenceTest.php (29 tests)
  • Complete a single recurrence instance on iOS; verify Nag keeps one master task with updated due date/completion state
  • Un-complete a completed instance on iOS; verify the instance reopens without duplicate rows
  • Open/edit a task from the Nag list view tabs (All, Incomplete, Future, Completed); verify no fatal error
  • Complete a task from the list view and confirm return URL preserves the active filter tab

Task::process() calls Nag::isTaskViewFilter() when building the
complete-link return URL, but the method was never implemented.
Add a validator for Nag::VIEW_* filter values so smart-search
tab names are not mistaken for VIEW_INCOMPLETE.
@TDannhauer TDannhauer merged commit 767c549 into FRAMEWORK_6_0 Jun 25, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant