fix(bookings): ensure scheduler confirmation email uses booker's time…#28476
Open
ChisomUma wants to merge 1 commit intocalcom:mainfrom
Open
fix(bookings): ensure scheduler confirmation email uses booker's time…#28476ChisomUma wants to merge 1 commit intocalcom:mainfrom
ChisomUma wants to merge 1 commit intocalcom:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
1 issue found across 7 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/features/bookings/lib/service/RegularBookingService.ts">
<violation number="1" location="packages/features/bookings/lib/service/RegularBookingService.ts:1390">
P2: Reschedule path does not preserve attendee time format and always uses request `timeFormat`, causing inconsistent attendee-facing time display when callers omit or send a different format.</violation>
</file>
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Add one-off context when rerunning by tagging
@cubic-dev-aiwith guidance or docs links (includingllms.txt) - Ask questions if you need clarification on any suggestion
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| firstName: (typeof bookerName === "object" && bookerName.firstName) || "", | ||
| lastName: (typeof bookerName === "object" && bookerName.lastName) || "", | ||
| timeZone: attendeeTimezone, | ||
| timeFormat: reqBody.timeFormat, |
Contributor
There was a problem hiding this comment.
P2: Reschedule path does not preserve attendee time format and always uses request timeFormat, causing inconsistent attendee-facing time display when callers omit or send a different format.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/features/bookings/lib/service/RegularBookingService.ts, line 1390:
<comment>Reschedule path does not preserve attendee time format and always uses request `timeFormat`, causing inconsistent attendee-facing time display when callers omit or send a different format.</comment>
<file context>
@@ -1387,6 +1387,7 @@ async function handler(
firstName: (typeof bookerName === "object" && bookerName.firstName) || "",
lastName: (typeof bookerName === "object" && bookerName.lastName) || "",
timeZone: attendeeTimezone,
+ timeFormat: reqBody.timeFormat,
language: { translate: tAttendees, locale: attendeeLanguage ?? "en" },
},
</file context>
Ryukemeister
requested changes
Mar 18, 2026
Contributor
Ryukemeister
left a comment
There was a problem hiding this comment.
hi @ChisomUma, thank you for your contribution. can you attach a visual demo of what this is fix looks like before and after. can you also please resolve the cubic review comments.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
… format
What does this PR do?
This PR fixes a bug where the scheduler's confirmation email would display the time in a 12-hour format even when the 24-hour format was selected on the booking page.
Changes:
timeFormatpreference viauseTimePreferences.timeFormatinto the CalendarEvent object.timeFormatover the organizer's default.Visual Demo
Note
Verified the fix using automated unit tests. The logic ensures that
AttendeeScheduledEmail.tsnow calculates the date string using:const inviteeTimeFormat = this.attendee.timeFormat || this.calEvent.organizer.timeFormat || TimeFormat.TWELVE_HOUR;Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
Run the newly added unit test which covers different combinations of organizer/attendee time format preferences:
Set your system/browser clock to 24-hour format.
Book an event on a Cal.com instance.
Verify that the confirmation email received by the booker shows the time in 24h format (e.g., "14:00") while the organizer receives it in their preferred format.