feat: check guest availability when rescheduling bookings#27960
Draft
omair445 wants to merge 3 commits intocalcom:mainfrom
Draft
feat: check guest availability when rescheduling bookings#27960omair445 wants to merge 3 commits intocalcom:mainfrom
omair445 wants to merge 3 commits intocalcom:mainfrom
Conversation
When a host reschedules a booking, the system now checks if any guests are Cal.com users and factors in their existing bookings as busy times. This prevents double-booking guests who have their own Cal.com accounts. Implementation: - Added UserRepository.findUsersByEmails() to look up Cal.com users by primary or verified secondary email addresses - Added BookingRepository.findAcceptedBookingsByUserIdsOrEmails() to find conflicting bookings for guest users - Added getGuestBusyTimesForReschedule() utility that orchestrates guest lookup → user resolution → booking conflict detection - Integrated guest busy times into getUserAvailability via initialData - Skipped for COLLECTIVE scheduling (hosts already have availability checked) The feature degrades gracefully — if guest lookup fails, rescheduling proceeds normally without guest availability constraints. Fixes calcom#16378
Graphite Automations"Send notification to Community team when bounty PR opened" took an action on this PR • (02/14/26)2 teammates were notified to this PR based on Keith Williams's automation. |
romitg2
requested changes
Feb 15, 2026
Member
romitg2
left a comment
There was a problem hiding this comment.
please add necessary tests, and provide video demo. Thank you!
Author
|
hey @romitg2, added tests for the guest availability logic! covers the main scenarios — guest lookup, busy time merging, graceful fallback when guests don't have cal accounts, edge cases like no guests/multiple guests, and error handling. working on the demo video now, will have it up shortly 👍 |
Author
|
added tests for the rescheduling flow — covers the main scenarios (no attendees, host filtering, guest lookup, multiple guests, error handling, etc). video demo coming shortly |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ran into this a few times — when rescheduling a meeting, the new time slot only checks the host's availability but completely ignores whether the guests are free. ends up creating conflicts.
this adds guest availability checking during reschedule:
changes:
fixes #16378