fix: bookings for guests added by organizer get cancelled when rescheduled#17820
Conversation
|
@kart1ka is attempting to deploy a commit to the cal Team on Vercel. A member of the Team first needs to authorize it. |
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (11/24/24)1 reviewer was added to this PR based on Keith Williams's automation. "Add community label" took an action on this PR • (11/24/24)1 label was added to this PR based on Keith Williams's automation. "Add ready-for-e2e label" took an action on this PR • (11/26/24)1 label was added to this PR based on Keith Williams's automation. |
E2E results are ready! |
|
This PR is being marked as stale due to inactivity. |
On it. |
Merge conflicts resolved. |
|
This PR is being marked as stale due to inactivity. |
|
@kart1ka tested and LGTM , once the comment is resolved , let's take this ahead |
Done |
TusharBhatt1
left a comment
There was a problem hiding this comment.
Tested works well , LGTM !
|
|
||
| if (originalRescheduledBooking) { | ||
| const eventHosts = eventType.hosts.length | ||
| ? eventType.hosts | ||
| : eventType.users.map((user) => ({ user, isFixed: false })); | ||
|
|
||
| // For round-robin bookings, find the host from original rescheduled booking | ||
| const originalRoundRobinHost = eventHosts.find( | ||
| (host) => | ||
| !host.isFixed && | ||
| originalRescheduledBooking?.attendees.some((attendee) => attendee.email === host.user.email) | ||
| )?.user; | ||
|
|
||
| const isSameRRHost = !!originalRescheduledBooking?.userId && eventType.rescheduleWithSameRoundRobinHost; | ||
|
|
||
| // Get the list of team members for original rescheduled booking | ||
| const originalRescheduledBookingTeamMembers = ( | ||
| isTeamEventType && eventType.schedulingType === SchedulingType.ROUND_ROBIN && !isSameRRHost | ||
| ? [...users.slice(0, -1), originalRoundRobinHost] | ||
| : [...users] | ||
| ).filter((user) => user?.email !== organizerUser.email); | ||
|
|
||
| // Get guests that were added by the booker in the original booking |
There was a problem hiding this comment.
@kart1ka Is this the right place for the changes? I think we should fix the addGuest handler and find out why it is causing this error. It should be similar to how we normally do it from the booking page. Not confident about the recent changes
…duled (#17820) * fix: bookings for guests added by organizer get cancelled when rescheduled * chore --------- Co-authored-by: Tushar Bhatt <95581504+TusharBhatt1@users.noreply.github.com>
…duled (calcom#17820) * fix: bookings for guests added by organizer get cancelled when rescheduled * chore --------- Co-authored-by: Tushar Bhatt <95581504+TusharBhatt1@users.noreply.github.com>
What does this PR do?
Screencast.from.25-11-24.12.25.13.AM.IST.webm
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?