[FIX] resource_booking: honor all-day calendar events when computing slots#2
[FIX] resource_booking: honor all-day calendar events when computing slots#2dnplkndll wants to merge 1 commit into
Conversation
Followup notes from the Techsystech reviewThese two cleanups are not part of this PR but were flagged during the review of Brenden Eshbach's (Techsystech) branch that this PR was extracted from. Recording here so they don't get lost. Followup A — portal helpers hardcode US locale and one method shadows itself
Plan: push these helpers into the consumer ( Followup B — portal template + SCSS refreshBrenden's branch also ships visual portal changes ( SourceCombined review branch: For later review with Brenden — not yet pinged. |
09de56a to
2b1fee2
Compare
OCA upstream readiness cleanupForce-pushed an amend that drops two non-substantive files from the diff so this branch is ready to lift directly into an OCA upstream PR:
The substantive code/tests are unchanged. Used Reference: OCA quality checklist, rules A3 (no manual version bumps) and A5 (no direct README.rst edits). |
…slots All-day calendar events store dates in start_date/stop_date and may have no start/stop datetimes (or values outside the analyzer's UTC window once timezone-shifted). The previous busy-events query filtered solely on start/stop, so a user's all-day event (PTO, off-site, etc.) would not block booking slots on that day. Extend the conflicting-events search with an OR predicate on start_date/stop_date for allday events, and render their busy interval from start_date through stop_date+1 in the analyzer's tz so a single all-day event blocks the full local day across calendar tz boundaries. Co-Authored-By: Brenden Eshbach <brenden@techsystech.com>
2b1fee2 to
3b1a404
Compare
Summary
All-day calendar events store dates in
start_date/stop_dateand may have nostart/stopdatetimes (or values that fall outside the analyzer's UTC window once timezone-shifted). The previous busy-events query in_calendar_event_busy_intervalsfiltered solely onstart/stop, so a user's all-day event (PTO, off-site, etc.) would silently fail to block booking slots on that day.This change:
start_date/stop_dateforalldayevents.start_datethroughstop_date + 1 dayin the analyzer's tz so a single all-day event blocks the full local day across calendar-tz boundaries.test_allday_event_blocks_booking_slotcovering the regression.Test plan
ledoent-calendar-18-0-fix-resource_booking-allday-events-*.runboat.hz.ledoweb.comProvenance
Surgical extraction from Brenden Eshbach's (Techsystech) work on the website_appointment_booking PR fork: see review branch
18.0-techsystech-review-resource_bookingfor the original combined diff.