Skip to content

fix: Incorrect RR host is shown in the email and calendar event for a seated RR event#21684

Merged
anikdhabal merged 5 commits into
calcom:mainfrom
anikdhabal:rr-seated-event-issue
Jun 11, 2025
Merged

fix: Incorrect RR host is shown in the email and calendar event for a seated RR event#21684
anikdhabal merged 5 commits into
calcom:mainfrom
anikdhabal:rr-seated-event-issue

Conversation

@anikdhabal
Copy link
Copy Markdown
Contributor

@anikdhabal anikdhabal commented Jun 3, 2025

What does this PR do?

Summary by cubic

Fixed an issue with seated round robin events where non-fixed hosts were not correctly assigned as booking users or attendees. This ensures bookings reflect the correct host assignments for round robin scheduling.

@anikdhabal anikdhabal requested a review from a team as a code owner June 3, 2025 07:48
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 3, 2025

@anikdhabal is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

@graphite-app graphite-app Bot requested a review from a team June 3, 2025 07:48
@keithwillcode keithwillcode added the core area: core, team members only label Jun 3, 2025
@dosubot dosubot Bot added bookings area: bookings, availability, timezones, double booking 🐛 bug Something isn't working labels Jun 3, 2025
@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Jun 3, 2025

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (06/03/25)

1 reviewer was added to this PR based on Keith Williams's automation.

"Add ready-for-e2e label" took an action on this PR • (06/11/25)

1 label was added to this PR based on Keith Williams's automation.

Copy link
Copy Markdown
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.

cubic found 2 issues across 1 file. Review them in cubic.dev

React with 👍 or 👎 to teach cubic. Tag @cubic-dev-ai to give specific feedback.

Comment thread packages/features/bookings/lib/handleNewBooking.ts Outdated
Comment thread packages/features/bookings/lib/handleNewBooking.ts Outdated
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
@anikdhabal anikdhabal changed the title fix: seated rr event fix: Incorrect RR host is shown in the email and calendar event for a seated RR event Jun 3, 2025
Comment on lines +665 to +666
if (originalNonFixedHost) {
users = [...fixedHosts, originalNonFixedHost];
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

For seated events, ensure host consistency across all remaining seats

Comment on lines +667 to +671
} else {
const attendeeEmailSet = new Set(booking.attendees.map((attendee) => attendee.email));

// In this case, the first booking user is a fixed host, so the chosen non-fixed host is added as an attendee of the booking
const nonFixedAttendeeHosts = users.filter(
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

When both fixed and non-fixed hosts are set for a round-robin event, the selected round-robin host is added as an attendee, and one of the fixed hosts becomes the organizer of the event.
To maintain consistency, we determine the round-robin host from the attendee record for the remaining seats

@anikdhabal anikdhabal requested a review from emrysal June 3, 2025 12:11
@anikdhabal anikdhabal added the High priority Created by Linear-GitHub Sync label Jun 4, 2025
Comment thread packages/features/bookings/lib/handleNewBooking.ts Outdated
@anikdhabal anikdhabal enabled auto-merge (squash) June 10, 2025 16:33
@anikdhabal anikdhabal requested a review from emrysal June 10, 2025 16:33
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 11, 2025

E2E results are ready!

@anikdhabal anikdhabal merged commit e82bd45 into calcom:main Jun 11, 2025
77 of 84 checks passed
BKM14 pushed a commit to BKM14/cal.com that referenced this pull request Jun 26, 2025
… seated RR event (calcom#21684)

* fix: seated rr event

* Update packages/features/bookings/lib/handleNewBooking.ts

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>

* update

* Update handleNewBooking.ts

---------

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bookings area: bookings, availability, timezones, double booking 🐛 bug Something isn't working core area: core, team members only High priority Created by Linear-GitHub Sync ready-for-e2e

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants