-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
fix: Seat Attendee Rescheduling Logic #14784
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Ignored Deployments
|
Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link. |
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
Current Playwright Test Results Summary✅ 319 Passing - ❌ 1 Failing - Run may still be in progress, this comment will be updated as current testing workflow or job completes... (Last updated on 05/08/2024 07:39:06pm UTC) Run DetailsRunning Workflow PR Update on Github Actions Commit: f381d13 Started: 05/08/2024 07:35:19pm UTC ❌ Failures📄 apps/web/playwright/profile.e2e.ts • 1 FailureTest Case Results
|
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Stripe integration Paid booking should be able to be rescheduled
Retry 1 • Initial Attempt |
1.84% (6)6 / 326 runsfailed over last 7 days |
9.20% (30)30 / 326 runsflaked over last 7 days |
📄 packages/app-store/routing-forms/playwright/tests/basic.e2e.ts • 2 Flakes
Top 1 Common Error Messages
|
2 Test Cases Affected |
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Routing Forms Seeded Routing Form Router URL should work
Retry 1 • Initial Attempt |
0% (0)0 / 352 runsfailed over last 7 days |
11.65% (41)41 / 352 runsflaked over last 7 days |
Routing Forms Seeded Routing Form Test preview should return correct route
Retry 1 • Initial Attempt |
0.28% (1)1 / 352 runfailed over last 7 days |
37.50% (132)132 / 352 runsflaked over last 7 days |
📄 apps/web/playwright/settings-admin.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Settings/admin tests -- future should render /settings/admin page
Retry 1 • Initial Attempt |
0% (0)0 / 387 runsfailed over last 7 days |
7.75% (30)30 / 387 runsflaked over last 7 days |
📄 apps/web/playwright/organization/organization-invitation.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Organization Email not matching orgAutoAcceptEmail nonexisting user invited to a Team inside organization
Retry 1 • Initial Attempt |
0.58% (2)2 / 342 runsfailed over last 7 days |
8.77% (30)30 / 342 runsflaked over last 7 days |
📄 packages/embeds/embed-core/playwright/tests/action-based.e2e.ts • 9 Flakes
Top 1 Common Error Messages
|
9 Test Cases Affected |
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Popup Tests should open embed iframe on click - Configured with light theme
Retry 1 • Initial Attempt |
4.82% (17)17 / 353 runsfailed over last 7 days |
53.82% (190)190 / 353 runsflaked over last 7 days |
Popup Tests should be able to reschedule
Retry 1 • Initial Attempt |
-130.14% (-190)-190 / 146 runsfailed over last 7 days |
130.14% (190)190 / 146 runsflaked over last 7 days |
Popup Tests should open Routing Forms embed on click
Retry 1 • Initial Attempt |
-131.03% (-190)-190 / 145 runsfailed over last 7 days |
131.03% (190)190 / 145 runsflaked over last 7 days |
Popup Tests Floating Button Popup Pro User - Configured in App with default setting of system theme should open embed iframe according to system theme when no theme is configured through Embed API
Retry 1 • Initial Attempt |
-128.28% (-186)-186 / 145 runsfailed over last 7 days |
128.28% (186)186 / 145 runsflaked over last 7 days |
Popup Tests Floating Button Popup Pro User - Configured in App with default setting of system theme should open embed iframe according to system theme when configured with 'auto' theme using Embed API
Retry 1 • Initial Attempt |
-128.28% (-186)-186 / 145 runsfailed over last 7 days |
128.28% (186)186 / 145 runsflaked over last 7 days |
Popup Tests Floating Button Popup Pro User - Configured in App with default setting of system theme should open embed iframe(Booker Profile Page) with dark theme when configured with dark theme using Embed API
Retry 1 • Initial Attempt |
-128.28% (-186)-186 / 145 runsfailed over last 7 days |
128.28% (186)186 / 145 runsflaked over last 7 days |
Popup Tests Floating Button Popup Pro User - Configured in App with default setting of system theme should open embed iframe(Event Booking Page) with dark theme when configured with dark theme using Embed API
Retry 1 • Initial Attempt |
-128.28% (-186)-186 / 145 runsfailed over last 7 days |
128.28% (186)186 / 145 runsflaked over last 7 days |
Popup Tests prendered embed should be loaded and apply the config given to it
Retry 1 • Initial Attempt |
-128.28% (-186)-186 / 145 runsfailed over last 7 days |
128.28% (186)186 / 145 runsflaked over last 7 days |
Popup Tests should open on clicking child element
Retry 1 • Initial Attempt |
-125.52% (-182)-182 / 145 runsfailed over last 7 days |
125.52% (182)182 / 145 runsflaked over last 7 days |
📄 apps/web/playwright/event-types.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Event Types tests -- future user can add multiple organizer address
Retry 1 • Initial Attempt |
1.10% (4)4 / 363 runsfailed over last 7 days |
26.17% (95)95 / 363 runsflaked over last 7 days |
📄 packages/embeds/embed-core/playwright/tests/namespacing.e2e.ts • 4 Flakes
Top 1 Common Error Messages
|
4 Test Cases Affected |
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Namespacing Inline Embed Add inline embed using a namespace without reload
Retry 1 • Initial Attempt |
0.56% (2)2 / 355 runsfailed over last 7 days |
51.83% (184)184 / 355 runsflaked over last 7 days |
Namespacing Inline Embed Double install Embed Snippet with inline embed using a namespace
Retry 1 • Initial Attempt |
1.13% (4)4 / 355 runsfailed over last 7 days |
52.39% (186)186 / 355 runsflaked over last 7 days |
Namespacing Inline Embed Double install Embed Snippet with inline embed without a namespace(i.e. default namespace)
Retry 1 • Initial Attempt |
0% (0)0 / 355 runsfailed over last 7 days |
52.96% (188)188 / 355 runsflaked over last 7 days |
Namespacing Different namespaces can have different init configs
Retry 1 • Initial Attempt |
0% (0)0 / 355 runsfailed over last 7 days |
52.39% (186)186 / 355 runsflaked over last 7 days |
📄 apps/web/playwright/teams.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Teams - NonOrg -- future Team Onboarding Invite Members
Retry 1 • Initial Attempt |
4.37% (16)16 / 366 runsfailed over last 7 days |
23.50% (86)86 / 366 runsflaked over last 7 days |
📄 apps/web/playwright/profile.e2e.ts • 2 Flakes
Top 1 Common Error Messages
|
2 Test Cases Affected |
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Update Profile Can update a users email (verification enabled)
Retry 1 • Initial Attempt |
25% (97)97 / 388 runsfailed over last 7 days |
33.51% (130)130 / 388 runsflaked over last 7 days |
Update Profile Can delete the newly added secondary email
Retry 1 • Initial Attempt |
0% (0)0 / 388 runsfailed over last 7 days |
0.52% (2)2 / 388 runsflaked over last 7 days |
📄 apps/web/playwright/unpublished.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Unpublished Organization user event-type
Retry 1 • Initial Attempt |
0% (0)0 / 352 runsfailed over last 7 days |
0.28% (1)1 / 352 runflaked over last 7 days |
📄 apps/web/playwright/login.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
user can login & logout succesfully -- future login flow user & logout using dashboard
Retry 2 • Retry 1 • Initial Attempt |
4.44% (16)16 / 360 runsfailed over last 7 days |
32.22% (116)116 / 360 runsflaked over last 7 days |
📄 apps/web/playwright/signup.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Signup Flow Test Email verification sent if enabled
Retry 1 • Initial Attempt |
0.82% (3)3 / 367 runsfailed over last 7 days |
10.35% (38)38 / 367 runsflaked over last 7 days |
📄 apps/web/playwright/organization/booking.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Bookings Team Event Can create a booking for Round Robin EventType
Retry 1 • Initial Attempt |
9.19% (33)33 / 359 runsfailed over last 7 days |
28.41% (102)102 / 359 runsflaked over last 7 days |
📄 packages/embeds/embed-react/playwright/tests/basic.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
React Embed Element Click Popup should verify that the iframe got created with correct URL - namespaced
Retry 1 • Initial Attempt |
18.38% (68)68 / 370 runsfailed over last 7 days |
38.38% (142)142 / 370 runsflaked over last 7 days |
@@ -1,5 +1,5 @@ | |||
import short from "short-uuid"; | |||
import { v5 as uuidv5 } from "uuid"; |
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.
I was getting iCalUID collisions. Looking into this we should be using uuidv4 for truly random uids
@@ -15,11 +15,13 @@ const getICalUID = ({ | |||
uid, | |||
event, | |||
defaultToEventUid, | |||
attendeeId, |
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.
Add the attendeeId
to the id to avoid further collisions
} else { | ||
// Rescheduling logic for the original seated event was handled in handleSeats | ||
// We want to use new booking logic for the new time slot | ||
originalRescheduledBooking = null; |
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.
If originalRescheduledbooking
was defined then we would have hit the rescheduling logic. That's already handled in handleSeats
// Update the original calendar event by removing the attendee that is rescheduling | ||
if (originalBookingEvt && originalRescheduledBooking) { | ||
// Event would probably be deleted so we first check than instead of updating references | ||
const filteredAttendees = originalRescheduledBooking?.attendees.filter((attendee) => { | ||
return attendee.email !== bookerEmail; | ||
}); | ||
const deletedReference = await lastAttendeeDeleteBooking( | ||
originalRescheduledBooking, | ||
filteredAttendees, | ||
originalBookingEvt | ||
); | ||
|
||
if (!deletedReference) { | ||
await eventManager.updateCalendarAttendees(originalBookingEvt, originalRescheduledBooking); | ||
} | ||
} | ||
|
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.
This block removes the rescheduling attendee from the calendar event. This should have been happening for every rescheduled booking instead of if there was no newTimeSlotBooking
// Add the new attendees to the new time slot booking attendees | ||
for (const attendee of newTimeSlotBooking.attendees) { | ||
const language = await getTranslation(attendee.locale ?? "en", "common"); | ||
evt.attendees.push({ | ||
email: attendee.email, | ||
name: attendee.name, | ||
language, | ||
}); | ||
} |
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.
The evt
that was being passed from handleNewBooking
only contained the rescheduling attendee. Let's add all attendees from the newTimeSlotBooking
before updating the event.
iCalUID: true, | ||
userId: true, | ||
attendees: { | ||
include: { | ||
bookingSeat: true, | ||
}, | ||
}, | ||
references: true, |
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.
Add the iCalUID and references of the newTimeSlotBooking
so that the proper 3rd party data is being updated.
@@ -76,17 +77,19 @@ const attendeeRescheduleSeatedBooking = async ( | |||
]); | |||
} | |||
|
|||
const copyEvent = cloneDeep(evt); | |||
|
|||
const updateManager = await eventManager.reschedule(copyEvent, rescheduleUid, newTimeSlotBooking.id); |
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.
We were calling the whole reschedule
logic of the EventManager
class but we only need to update calendar attendees.
evt.iCalUID = Array.isArray(calendarResult?.updatedEvent) | ||
? calendarResult?.updatedEvent[0]?.iCalUID | ||
: calendarResult?.updatedEvent?.iCalUID || undefined; | ||
await eventManager.updateCalendarAttendees(copyEvent, newTimeSlotBooking); |
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.
Only update the new time slot calendar event with the rescheduled attendee. Emails are still being sent to the organizer and rescheduled attendee.
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (04/28/24)1 reviewer was added to this PR based on Keith Williams's automation. |
hell yeah! this will make many people incluiding me very happy |
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.
Maybe something wrong with my setup. I tried enabling "Offer seats" and in the video you can see that it displayed 2 are available for slot 9:45 am but after one attendee has booked then that slot is no longer displayed.
Screen.Recording.2024-04-29.at.4.36.29.PM.mov
Interesting, I dug into it, and the collective hosts other than the organizer count towards the attendee count. That's why the slot is disappearing for you. I'll create a ticket for this. |
This PR is being marked as stale due to inactivity. |
What does this PR do?
This PR aims to fix bugs around when attendees reschedule a seated event to different time slots. We do this by:
Fixes # (issue)
Requirement/Documentation
Type of change
How should this be tested?
Mandatory Tasks
Checklist