Skip to content

Fix ORGANIZER handling for exception events#329

Merged
sunkup merged 1 commit intomainfrom
271-put-fails-caldavsame-organizer-in-all-components-because-icalendar-contains-different-organizer-values-in-components
Apr 21, 2026
Merged

Fix ORGANIZER handling for exception events#329
sunkup merged 1 commit intomainfrom
271-put-fails-caldavsame-organizer-in-all-components-because-icalendar-contains-different-organizer-values-in-components

Conversation

@sunkup
Copy link
Copy Markdown
Member

@sunkup sunkup commented Apr 16, 2026

ORGANIZER must be the same value for all participating components - main event and its exceptions.

  • In OrganizerHandler: Also check whether main event has attendees instead of only checking for exception attendees to decide on whether we should add ORGANIZER to the necessarily group-scheduled event.
  • add tests to avoid future regression ensuring ORGANIZER must be same in exception even with/without attendees

@sunkup sunkup requested a review from Copilot April 16, 2026 10:06
@sunkup sunkup self-assigned this Apr 16, 2026
@sunkup sunkup added the pr-bugfix Fixes something that isn't working (only used for PRs) label Apr 16, 2026
Copy link
Copy Markdown
Contributor

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 adjusts ORGANIZER mapping when generating iCalendar VEVENTs from Android calendar provider rows, specifically to keep exception instances aligned with their recurring main event’s ORGANIZER.

Changes:

  • Update OrganizerHandler to base attendee/group-scheduling detection on the main event (to ensure exceptions inherit ORGANIZER even if they have no attendees).
  • Add tests covering ORGANIZER inheritance for exceptions and absence of ORGANIZER for non-group-scheduled events.

Reviewed changes

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

File Description
lib/src/main/kotlin/at/bitfire/synctools/mapping/calendar/handler/OrganizerHandler.kt Changes attendee detection logic used to decide whether to emit ORGANIZER.
lib/src/test/kotlin/at/bitfire/synctools/mapping/calendar/handler/OrganizerHandlerTest.kt Adds regression tests for ORGANIZER handling on exceptions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sunkup sunkup force-pushed the 271-put-fails-caldavsame-organizer-in-all-components-because-icalendar-contains-different-organizer-values-in-components branch from 17dc283 to 206d37b Compare April 16, 2026 11:18
@sunkup sunkup marked this pull request as ready for review April 16, 2026 11:34
@sunkup sunkup requested a review from rfc2822 April 16, 2026 11:34
@sunkup sunkup force-pushed the 271-put-fails-caldavsame-organizer-in-all-components-because-icalendar-contains-different-organizer-values-in-components branch 3 times, most recently from d3dee5b to 1ce96b4 Compare April 20, 2026 13:55
@sunkup sunkup requested a review from rfc2822 April 20, 2026 13:56
Copy link
Copy Markdown
Member

@rfc2822 rfc2822 left a comment

Choose a reason for hiding this comment

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

I think this won't work, we had it like this before 2020 and changed it in bitfireAT/ical4android@80b9945.

See for instance the comment here:

// ORGANIZER must only be set for group-scheduled events (= events with attendees)

We should have a note that documents the problem in this PR, maybe the same comment:

ORGANIZER must only be set for group-scheduled events (= events with attendees

@sunkup sunkup force-pushed the 271-put-fails-caldavsame-organizer-in-all-components-because-icalendar-contains-different-organizer-values-in-components branch from 1ce96b4 to 9432a58 Compare April 21, 2026 09:07
Copy link
Copy Markdown
Member

@rfc2822 rfc2822 left a comment

Choose a reason for hiding this comment

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

Looks good!

@sunkup sunkup merged commit 26602e6 into main Apr 21, 2026
7 checks passed
@sunkup sunkup deleted the 271-put-fails-caldavsame-organizer-in-all-components-because-icalendar-contains-different-organizer-values-in-components branch April 21, 2026 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-bugfix Fixes something that isn't working (only used for PRs)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PUT fails (CALDAV:same-organizer-in-all-components) because iCalendar contains different ORGANIZER values in components

3 participants