Fix recreation of recurring tasks when RECURRENCE-ID changes - #2368
Open
alibaba4711 wants to merge 1 commit into
Open
Fix recreation of recurring tasks when RECURRENCE-ID changes#2368alibaba4711 wants to merge 1 commit into
alibaba4711 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When a recurring VTODO with an existing
RECURRENCE-IDexception 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
RRULEremains in the database in addition to the modified exception.Example:
A recurring task contains:
RECURRENCE-ID)After a fresh sync/import, jtx Board incorrectly displays:
The open Aug 20 instance generated from the
RRULEshould be replaced by the exception.Cause
SyncContentProvidercurrently callsrecreateRecurring()whenRRULE,RDATEorEXDATEis inserted or updated.However, changes involving
RECURRENCE-IDdon't triggerrecreateRecurring().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()whenCOLUMN_RECURIDis present, both for inserts and updates.Test
Tested with:
Before the patch, a fresh synchronization produced 4 instances:
After the patch and a fresh synchronization, the expected 3 instances are produced:
The fix was successfully built and tested against jtx Board 2.17.00.
After rebasing the commit onto the current
developbranch, a local build is currently blocked by an unrelated Android Gradle Plugin version conflict between jtx Board and the pinneddavx5-osecomposite build.