Skip to content

Fix recreation of recurring tasks when RECURRENCE-ID changes - #2368

Open
alibaba4711 wants to merge 1 commit into
TechbeeAT:developfrom
alibaba4711:fix-recurrence-id-rebuild
Open

Fix recreation of recurring tasks when RECURRENCE-ID changes#2368
alibaba4711 wants to merge 1 commit into
TechbeeAT:developfrom
alibaba4711:fix-recurrence-id-rebuild

Conversation

@alibaba4711

Copy link
Copy Markdown

Problem

When a recurring VTODO with an existing RECURRENCE-ID exception is imported through the sync content provider, jtx Board does not rebuild the generated recurrence instances.

As a result, the original occurrence generated from the RRULE remains in the database in addition to the modified exception.

Example:

A recurring task contains:

  • Aug 20 – completed exception (RECURRENCE-ID)
  • Aug 27 – open
  • Sep 3 – open

After a fresh sync/import, jtx Board incorrectly displays:

  • Aug 20 – open
  • Aug 20 – completed
  • Aug 27 – open
  • Sep 3 – open

The open Aug 20 instance generated from the RRULE should be replaced by the exception.

Cause

SyncContentProvider currently calls recreateRecurring() when RRULE, RDATE or EXDATE is inserted or updated.

However, changes involving RECURRENCE-ID don't trigger recreateRecurring().

This means that when a recurrence exception is inserted after the recurring master, the already generated occurrence is not removed/rebuilt.

Fix

Also trigger recreateRecurring() when COLUMN_RECURID is present, both for inserts and updates.

Test

Tested with:

  • jtx Board 2.17.00 OSE
  • DAVx⁵ 4.5.19 OSE
  • CalDAV server: Baïkal

Before the patch, a fresh synchronization produced 4 instances:

  • Aug 20 – open
  • Aug 20 – completed
  • Aug 27 – open
  • Sep 3 – open

After the patch and a fresh synchronization, the expected 3 instances are produced:

  • Aug 20 – completed
  • Aug 27 – open
  • Sep 3 – open

The fix was successfully built and tested against jtx Board 2.17.00.

After rebasing the commit onto the current develop branch, a local build is currently blocked by an unrelated Android Gradle Plugin version conflict between jtx Board and the pinned davx5-ose composite build.

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