Skip to content

fix(bookings): save full day for all-day room bookings (PPT-2804) - #498

Open
MrYuion wants to merge 1 commit into
developfrom
fix/PPT-2804-all-day-room-booking
Open

MrYuion wants to merge 1 commit into
developfrom
fix/PPT-2804-all-day-room-booking

Conversation

@MrYuion

@MrYuion MrYuion commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

With app.events.use_bookings on, an All Day room booking did not reserve the full day.

The one-hour result in PPT-2804 came from a missing duration. PPT-2810 (eb9bf26b8) already fixed that on develop. One defect remained: the event form builds the all-day range to 23:59:59.999, and CalendarEvent stores its end in whole seconds (23:59:59.000). toJSON compared the day bounds in milliseconds, so the check failed. The event was sent as a custom period with all_day: false, ending at 23:59:59.

Fix

  • CalendarEvent.toJSON compares the day bounds in seconds. A full day is now sent as all_day: true, from 00:00 to the next 00:00.
  • newBookingFromCalendarEvent passes the event all_day flag and timezone to Booking. A 23-hour DST day stays all day, and the booking uses the organiser timezone.

Side effects:

  • Calendar (non-native) all-day saves get the same corrected payload.
  • An event saved by the old bug (00:00 to 23:59:59, custom_all_day) is saved as a normal all-day event when it is next edited.
  • Custom all_day_period ranges do not change.

Checks

  • bunx nx run-many -t test -p common,bookings,events: pass
  • bunx nx build workplace: pass
  • New tests: full-day native booking payload, and toJSON with an explicit timezone.

Recording: PPT-2804-all-day-room-booking.gif (terminal run of the focused tests. There is no local backend.)

Changes made by Claude Opus 5.5 (1M context) in Claude Code.

🤖 Generated with Claude Code

An all-day event ends at 23:59:59.999, but the event stores its end in
whole seconds. The full-day check in toJSON compared milliseconds, so it
failed and sent the booking as a custom period ending at 23:59:59 with
all_day false. Compare the day bounds in seconds instead.

Native room bookings also now keep the event all_day flag and timezone,
so a 23-hour DST day stays all day.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
frontend-templates Ignored Ignored Preview Sep 23, 2026 12:21am UTC

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant