-
Notifications
You must be signed in to change notification settings - Fork 11.5k
fix: pass seatUid when rescheduling seated booking from booking limit error #26389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
… error Co-Authored-By: rajiv@cal.com <sahalrajiv6900@gmail.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this 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 2 files
… seated events Co-Authored-By: rajiv@cal.com <sahalrajiv6900@gmail.com>
hbjORbj
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems safe and nice
| where: { | ||
| email: bookerEmail, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any reason for adding this WHERE clause?
What does this PR do?
Fixes a bug where rescheduling a seated booking (triggered by the "Limit number of upcoming bookings per booker" option with reschedule offer) would reschedule all attendees instead of just the individual attendee who hit their booking limit.
Fixes - CAL7007
Root cause: When the
BookerLimitExceededRescheduleerror was thrown, it didn't include theseatUidfor the booker's seat. Without this, the reschedule was treated as an owner-level reschedule that moves all attendees.Fix:
bookingSeat.referenceUidwhen checking booking limitsseatUidin the error dataseatUid(when available) as the reschedule UID to trigger individual seat reschedule behaviorMandatory Tasks (DO NOT REMOVE)
How should this be tested?
Create an event type with:
Have User A book a seat on the event
Have User B book a seat on the same time slot
Have User A try to book another time slot
User A should be offered to reschedule their previous booking
Accept the reschedule offer
Expected: Only User A's seat moves to the new time slot. User B remains on the original booking.
Before fix: Both User A and User B would be moved to the new time slot.
Checklist
Human Review Checklist
seatUidas the reschedule UID correctly triggers individual seat reschedule (vs owner reschedule)where: { email: bookerEmail }filter correctly gets only the booker's seatConsider if automated tests should be added for this scenario- Test added inbooking-validations.test.tsUpdates since last revision
includes seatUid in reschedule error for seated eventsinbooking-validations.test.tsthat verifies:rescheduleUid(booking UID) andseatUid(seat reference UID)Link to Devin run: https://app.devin.ai/sessions/a845a427bab44e0589b39126f7f0e8f6
Requested by: @Ryukemeister (rajiv@cal.com)