fix: Booker fix for team + user with same event + event slug#9654
fix: Booker fix for team + user with same event + event slug#9654hariombalhara merged 5 commits intomainfrom
Conversation
… team have the same slug AND the same event with same slug
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Thank you for following the naming conventions! 🙏 |
| rescheduleBooking={booking} | ||
| isAway={away} | ||
| hideBranding={isBrandingHidden} | ||
| isTeamEvent |
There was a problem hiding this comment.
New boolean in booker that can now force it to only fetch team events.
There was a problem hiding this comment.
We would probably have to do it for private links as well. A private link can be a team event or user event.
There was a problem hiding this comment.
Added it, great suggestion!
| useEffect(() => { | ||
| initializeStore({ username, eventSlug, month, eventId, rescheduleUid, rescheduleBooking, layout }); | ||
| }, [initializeStore, username, eventSlug, month, eventId, rescheduleUid, rescheduleBooking, layout]); | ||
| initializeStore({ |
There was a problem hiding this comment.
Prettier did it's thing. The isTeamEvent boolean is added to the effect here.
| */ | ||
| export const useEvent = () => { | ||
| const [username, eventSlug] = useBookerStore((state) => [state.username, state.eventSlug], shallow); | ||
| const isTeamEvent = useBookerStore((state) => state.isTeamEvent); |
There was a problem hiding this comment.
the useEvent hook takes the isTeamEvent boolean from the store and automatically passes that to the query so it fetches the right data.
📦 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✅ 109 Passing - ❌ 4 Failing - Run may still be in progress, this comment will be updated as current testing workflow or job completes... (Last updated on 06/21/2023 06:59:27am UTC) Run DetailsRunning Workflow PR Update on Github Actions Commit: 9630161 Started: 06/21/2023 06:57:31am UTC ❌ Failures📄 packages/embeds/embed-core/playwright/tests/action-based.e2e.ts • 3 FailuresTop 1 Common Error Messages
Test Case Results
📄 packages/embeds/embed-core/playwright/tests/inline.e2e.ts • 1 FailureTest Case Results
|
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Event Types tests user -- old-booker can add multiple organizer address
Retry 1 • Initial Attempt |
3.40% (10)10 / 294 runsfailed over last 7 days |
30.61% (90)90 / 294 runsflaked over last 7 days |
📄 apps/web/playwright/booking-pages.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
pro user -- new-booker can book an event that requires confirmation and then that booking can be accepted by organizer
Retry 1 • Initial Attempt |
0.33% (1)1 / 300 runfailed over last 7 days |
0.67% (2)2 / 300 runsflaked over last 7 days |
📄 apps/web/playwright/booking-seats.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Booking with Seats -- new-booker Attendees can cancel a seated event time slot
Retry 1 • Initial Attempt |
0.98% (3)3 / 307 runsfailed over last 7 days |
5.54% (17)17 / 307 runsflaked over last 7 days |
There was a problem hiding this comment.
Requested one change. Otherwise looks good.
Renamed seeded-team slug to teampro and then did the following tests
- Visited /new-booker/teampro/30min - Serves user event.
- Visited /new-booker/team/teampro/30min(after creating 30min event in Seeded Team). Serves team event.
Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
Thanks a lot for testing! Just fixed your suggested changing. Re-requesting review 😁 |
What does this PR do?
If there would a user that was part of a team that had the exact same slug as the user, AND also both the team and the user have an event with te same slug, it would show the user event on the team page.
This PR changes that behaviour. Now we have the option in the booker the force it the only fetch a team event. That boolean is passed on the team pages, which results in the query only fetching team events, instead of running an
ORquery and fetching the first match.Fixes #8579
Type of change
How should this be tested?
seeded. Go to the seeded team page and change the slug toseededtoo. Then create an event in both the team and the teampro-profile with a slugtest. With the changes in this PR, it should simply show both event pages correctly.