Skip to content

fix: CalDAV default calendar not written on booking#28445

Open
Harshithk951 wants to merge 2 commits intocalcom:mainfrom
Harshithk951:fix/caldav-default-calendar-booking-clean
Open

fix: CalDAV default calendar not written on booking#28445
Harshithk951 wants to merge 2 commits intocalcom:mainfrom
Harshithk951:fix/caldav-default-calendar-booking-clean

Conversation

@Harshithk951
Copy link
Contributor

What does this PR do?

When "Add to calendar" is set to "Default" in the CalDAV app, no calendar entry was created on booking even though confirmation emails were sent correctly.

Root cause: the filter in BaseCalendarService.createEvent fell through with : true when no destinationCalendar externalId was set, causing createCalendarObject to fire against every discovered calendar collection. Servers like GMX silently drop these writes so no entry is ever created.

Fix: replace : true with calendars.slice(0, 1) — use only the first (primary) calendar when no explicit destination is configured. The explicit-calendar path is unchanged.

Mandatory Tasks

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. N/A — no API or config changes.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  1. Set up CalDAV app with a GMX or any CalDAV provider
  2. Create an event type with "Add to calendar" set to "Default"
  3. Book an appointment
  4. Verify a calendar entry is created in the provider's calendar

Checklist

  • My changes generate no new warnings (Biome + tsc verified)
  • PR is under 500 lines / 10 files

@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label Mar 15, 2026
@Harshithk951
Copy link
Contributor Author

@sahitya-chandra I don't have access to a CalDAV provider (e.g. GMX) to record a
reproduction video locally. The fix is a one-line logic change — replacing : true
with calendars.slice(0, 1) in the default calendar filter. Happy to add a unit test
instead if that would be sufficient for review.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

@Harshithk951 Harshithk951 force-pushed the fix/caldav-default-calendar-booking-clean branch from 1dac870 to 7a38fb5 Compare March 16, 2026 13:07
Copy link
Member

@sahitya-chandra sahitya-chandra left a comment

Choose a reason for hiding this comment

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

Can't approve this without video evidence...

Will you be able to provide it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community Created by Linear-GitHub Sync size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants