Skip to content

[jtx rewrite] Add Handlers for Recurrence Fields#2267

Closed
ArnyminerZ wants to merge 2 commits into
mainfrom
jtx-rewrite-add-handlers-for-recurrence-fields
Closed

[jtx rewrite] Add Handlers for Recurrence Fields#2267
ArnyminerZ wants to merge 2 commits into
mainfrom
jtx-rewrite-add-handlers-for-recurrence-fields

Conversation

@ArnyminerZ

Copy link
Copy Markdown
Member

Purpose

Copied from bitfireAT/synctools#410

Short description

  • Implement RecurrenceFieldsHandler
  • Implement tests for the new class

Checklist

  • The PR has a proper title, description and label.
  • I have self-reviewed the PR.
  • I have added documentation to complex functions and functions that can be used by other modules.
  • I have added reasonable tests or consciously decided to not add tests.

Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
@ArnyminerZ ArnyminerZ self-assigned this May 26, 2026
@ArnyminerZ ArnyminerZ added the refactoring Internal improvement of existing functions label May 26, 2026
@ArnyminerZ ArnyminerZ requested a review from Copilot May 26, 2026 15:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds recurrence-field support to the new JTX mapping pipeline by introducing a dedicated RecurrenceFieldsHandler, wiring it into JtxObjectHandler, and covering the behavior with unit tests (including a regression case for “RDATE-only recurrence”).

Changes:

  • Implement RecurrenceFieldsHandler to map RRULE, RDATE, EXDATE, and exception RECURRENCE-ID.
  • Update JtxObjectHandler to treat RDATE as recurrence so exceptions are included even without an RRULE.
  • Add/extend Robolectric tests for both the new handler and exception-inclusion behavior.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
synctools/src/main/kotlin/at/bitfire/synctools/mapping/jtx/JtxObjectHandler.kt Registers the new handler and includes exceptions for RRULE or RDATE recurrence.
synctools/src/main/kotlin/at/bitfire/synctools/mapping/jtx/handler/RecurrenceFieldsHandler.kt New handler mapping recurrence-related fields from JTX entities to ical4j properties.
synctools/src/test/kotlin/at/bitfire/synctools/mapping/jtx/JtxObjectHandlerTest.kt Adds regression tests ensuring exceptions are included for RDATE-only recurrence.
synctools/src/test/kotlin/at/bitfire/synctools/mapping/jtx/handler/RecurrenceFieldsHandlerTest.kt New test suite validating recurrence field mapping across timezone/all-day/floating cases.

Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

@rfc2822 rfc2822 added the jtx Board Related to jtx Board label Jun 4, 2026
@ArnyminerZ ArnyminerZ closed this Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jtx Board Related to jtx Board refactoring Internal improvement of existing functions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants