Skip to content

Conversation

rfc2822
Copy link
Member

@rfc2822 rfc2822 commented Oct 2, 2025

  • calendar provider → VEVENT: filter invalid RRULE with UNTIL before DTSTART
  • VEVENT → calendar provider: add test to show that such invalid RRULEs are no problem; so we don't need to manipulate them

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.
@rfc2822 rfc2822 linked an issue Oct 2, 2025 that may be closed by this pull request
@rfc2822 rfc2822 self-assigned this Oct 2, 2025
@rfc2822 rfc2822 added the refactoring Quality improvement of existing functions label Oct 2, 2025
@rfc2822 rfc2822 marked this pull request as ready for review October 2, 2025 11:36
@rfc2822 rfc2822 requested a review from a team as a code owner October 2, 2025 11:36
@rfc2822 rfc2822 requested review from sunkup and ArnyminerZ October 2, 2025 11:36
@rfc2822 rfc2822 requested a review from Copilot October 2, 2025 12:06
Copy link
Contributor

@Copilot Copilot AI left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Quality improvement of existing functions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Drop EventValidator.removeRRulesWithUntilBeforeDtStart
1 participant