-
Notifications
You must be signed in to change notification settings - Fork 3
Ignore recurrence rules whose UNTIL is on or before DTSTART #95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Ignore recurrence rules whose UNTIL is on or before DTSTART #95
Conversation
When parsing RRULE and EXRULE, skip rules whose UNTIL ≤ event DTSTART and log a warning. Add unit tests for RRULE/EXRULE with UNTIL before DTSTART and rename the test class.
…ose UNTIL is before DTSTART
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR improves handling of invalid recurrence rules by filtering out RRULE and EXRULE instances where the UNTIL date is on or before the event's DTSTART date. The implementation moves validation from EventValidator to RecurrenceFieldsProcessor to prevent invalid rules from being created in the first place.
Key changes:
- Added filtering logic in RecurrenceFieldsProcessor to skip RRULE/EXRULE with invalid UNTIL dates
- Removed the validation and removal logic from EventValidator that previously handled these cases
- Added comprehensive tests to verify the new behavior works correctly
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
RecurrenceFieldsProcessor.kt | Added validation to filter out RRULE/EXRULE with UNTIL <= DTSTART during processing |
EventValidator.kt | Removed validation methods and repair logic for invalid RRULE UNTIL dates |
RecurrenceFieldProcessorTest.kt | Added tests for RRULE and EXRULE filtering, fixed class name typo |
EventValidatorTest.kt | Removed all tests related to UNTIL validation that are no longer needed |
AndroidCalendarProviderBehaviorTest.kt | Added test to verify invalid RRULE can still be inserted into calendar provider |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
.../test/kotlin/at/bitfire/synctools/mapping/calendar/processor/RecurrenceFieldProcessorTest.kt
Show resolved
Hide resolved
.../test/kotlin/at/bitfire/synctools/mapping/calendar/processor/RecurrenceFieldProcessorTest.kt
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but see the comment.
Uh oh!
There was an error while loading. Please reload this page.