Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| } | ||
| ); | ||
|
|
||
| const scheduleForEventOnADayWithDateOverrideDifferentTimezone = await getSchedule( |
There was a problem hiding this comment.
Here attendee has a different timezone than the organizer. This test would have failed before and fixes #8329
| const inviteeUtcOffset = dayjs(override.start.toString()).tz(timeZone).utcOffset(); | ||
| const offset = inviteeUtcOffset - organizerUtcOffset; | ||
|
|
||
| return { |
There was a problem hiding this comment.
the times of activeOverrides show the date override in the organizer's availability timezone, we return the overrides in the time of the timezone set on the booking page
| //check if date override for slot exists | ||
| let dateOverrideExist = false; | ||
|
|
||
| if ( |
There was a problem hiding this comment.
If a date override exists on the day of the slot and the slot starts before that or ends after that date override it will return false (not available)
|
@hariombalhara I think you created the getSchedule tests, right? It uses |
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 Two Pages Changed SizeThe following pages changed size from the code in this PR compared to its base branch:
DetailsOnly the gzipped size is provided here based on an expert tip. First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If Any third party scripts you have added directly to your app using the The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored. |
Current Playwright Test Results Summary✅ 67 Passing - Run may still be in progress, this comment will be updated as current testing workflow or job completes... (Last updated on 04/18/2023 03:14:28pm UTC) Run DetailsRunning Workflow PR Update on Github Actions Commit: ee38fd2 Started: 04/18/2023 03:08:13pm UTC
|
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Manage Booking Questions For User EventType Do a booking with a user added question and verify a few thing in b/w
Retry 1 • Initial Attempt |
1.22% (3)3 / 246 runsfailed over last 7 days |
3.25% (8)8 / 246 runsflaked over last 7 days |
📄 apps/web/playwright/embed-code-generator.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Embed Code Generator Tests Event Type Edit Page open Embed Dialog for the Event Type
Retry 1 • Initial Attempt |
3.16% (8)8 / 253 runsfailed over last 7 days |
22.92% (58)58 / 253 runsflaked over last 7 days |
|
Tests for the fix of #8207 are still missing. I am working on it |
packages/lib/slots.ts
Outdated
| const organizerUtcOffset = dayjs(override.start.toString()).tz(organizerTimeZone).utcOffset(); | ||
| const inviteeUtcOffset = dayjs(override.start.toString()).tz(timeZone).utcOffset(); |
There was a problem hiding this comment.
NIT
| const organizerUtcOffset = dayjs(override.start.toString()).tz(organizerTimeZone).utcOffset(); | |
| const inviteeUtcOffset = dayjs(override.start.toString()).tz(timeZone).utcOffset(); | |
| const organizerUtcOffset = dayjs(override.start).tz(organizerTimeZone).utcOffset(); | |
| const inviteeUtcOffset = dayjs(override.start).tz(timeZone).utcOffset(); |
Not tested but do we need this to be toString? We seem to just use override.start/end everywhere
There was a problem hiding this comment.
toString and non-toString are basically identical. for Dayjs purposes I'd probably do, but it's probably all the same:
Dayjs.utc(override.start.toISOString()).tz(...
sean-brydon
left a comment
There was a problem hiding this comment.
Nice work <3 UTC gets complicated i can see this one being tricky
📦 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! 🙌 |
emrysal
left a comment
There was a problem hiding this comment.
Two comments, second one is possibly broken but waiting for @CarinaWolli to review my comments.
packages/lib/slots.ts
Outdated
| const organizerUtcOffset = dayjs(override.start.toString()).tz(organizerTimeZone).utcOffset(); | ||
| const inviteeUtcOffset = dayjs(override.start.toString()).tz(timeZone).utcOffset(); |
There was a problem hiding this comment.
toString and non-toString are basically identical. for Dayjs purposes I'd probably do, but it's probably all the same:
Dayjs.utc(override.start.toISOString()).tz(...
| const timeSlots: ReturnType<typeof getTimeSlots> = []; | ||
|
|
||
| const organizerTimeZone = | ||
| eventType.timeZone || eventType?.schedule?.timeZone || userAvailability?.[0]?.timeZone; |
There was a problem hiding this comment.
I'm not sure userAvailability?.[0] works; I think you need to involve the defaultSchedule here
emrysal
left a comment
There was a problem hiding this comment.
Approve as it was already an issue @CarinaWolli
|
Putting it in draft as I think I just found another issue with timezones. Testing right now |
| time: slot.time, | ||
| ...schedule, | ||
| ...availabilityCheckProps, | ||
| organizerTimeZone: schedule.timeZone, |
There was a problem hiding this comment.
@alex we want to have the schedule's timezone here
📦 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! 🙌 |
This reverts commit 3ef3284.
mfeuerstein
left a comment
There was a problem hiding this comment.
PR Review — approved
Reviewed 4 files. 0 high-severity issues found. Verdict: approved.
packages/types/schedule.d.ts (low)
- Reviewed packages/types/schedule.d.ts — looks good
packages/trpc/server/routers/viewer/slots.ts (low)
- Reviewed packages/trpc/server/routers/viewer/slots.ts — looks good
apps/web/test/lib/getSchedule.test.ts (low)
- Reviewed apps/web/test/lib/getSchedule.test.ts — looks good
packages/lib/slots.ts (low)
- Reviewed packages/lib/slots.ts — looks good

What does this PR do?
This PR fixes that date overrides of fixed hosts are taken into account for round-robin events. This prevents round-robin events being booked where the fixed hosts are unavailable.
This PR also fixes that date overrides didn't adjust to different timezones. If the organizer has a date override from 10-11 UTC it always showed the slots from 10-11 open no matter what timezone the attendee has.
Fixes #8207
Fixes #8329
Fixes: #8273
Environment: Staging(main branch) / Production
Type of change
How should this be tested?
Date overrides for fixed hosts (round-robin):
Date override timezones issue: