Commit 36ebaa9
committed
fix(guest-availability): use overlap semantics for busy time query
The previous condition (startTime >= windowStart AND endTime <= windowEnd)
only matched bookings fully contained within the search window. Bookings
that straddle a boundary — e.g. a guest booking that starts before the
rescheduling window begins but ends inside it — were silently dropped,
leaving a gap in conflict detection.
Fix: switch to standard interval-overlap semantics:
startTime < windowEnd AND endTime > windowStart
This correctly captures every booking whose time range intersects the
window, regardless of whether it extends beyond either edge.
Addresses P2 feedback from cubic review of PR #28164.1 parent 6ccf3bf commit 36ebaa9
1 file changed
Lines changed: 6 additions & 2 deletions
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2193 | 2193 | | |
2194 | 2194 | | |
2195 | 2195 | | |
2196 | | - | |
2197 | | - | |
| 2196 | + | |
| 2197 | + | |
| 2198 | + | |
| 2199 | + | |
| 2200 | + | |
| 2201 | + | |
2198 | 2202 | | |
2199 | 2203 | | |
2200 | 2204 | | |
| |||
0 commit comments