Advanced date override handling and timezone compatibility improvements#6
Advanced date override handling and timezone compatibility improvements#6ShashankFC wants to merge 1 commit into
Conversation
* fix date override for fixed round robin + time zone in date override * check if slot is within working hours of fixed hosts * add test for date override in different time zone * fix date overrides for not fixed hosts (round robin) * code clean up * fix added test * use the correct timezone of user for date overrides --------- Co-authored-by: CarinaWolli <wollencarina@gmail.com>
|
Hey there and thank you for opening this pull request! 👋🏼 We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted. Details: |
|
Claude finished @ShashankFC's task in 1m 45s —— View job Code Review CompleteI've reviewed this PR's advanced date override handling and timezone compatibility improvements. Here are my findings: Issues Found🔴 Critical Issues1. Bug in working hours validation logic (packages/trpc/server/routers/viewer/slots.ts:142) The const start = slotStartTime.hour() * 60 + slotStartTime.minute();
const end = slotStartTime.hour() * 60 + slotStartTime.minute(); // ❌ Should use slotEndTimeThis means the working hours check only validates the start time, not whether the entire slot fits within working hours. Fix this → 2. Incorrect equality comparison in date override check (packages/trpc/server/routers/viewer/slots.ts:114) if (dayjs(date.start).add(utcOffset, "minutes") === dayjs(date.end).add(utcOffset, "minutes")) {
return true;
}This uses 3. Missing null safety check (packages/trpc/server/routers/viewer/slots.ts:212) The code assumes const organizerUtcOffset = dayjs(override.start.toString()).tz(override.timeZone).utcOffset();If
|
|
This PR is being marked as stale due to inactivity. |
Test 7nn---nReplicated from ai-code-review-evaluation/cal.com-greptile#7