Skip to content

Conversation

@vpaturet
Copy link
Contributor

@vpaturet vpaturet commented Feb 2, 2026

Summary

As detailed in #7203, when a bookingTime parameter is provided in flex trip queries, the requestedBookingTime was calculated once relative to the search date's start-of-service, then reused for all FlexServiceDate objects across multiple days. This caused valid trips to be incorrectly filtered out when the booking time and trip departure were on different days.

Changed FlexServiceDate to store the original Instant and ZoneId, then calculate seconds-since-start-of-service on-demand relative to each date's own start-of-service. This ensures booking time comparisons use the correct reference point for each service date.

Issue

Closes #7203

Unit tests

Updated unit tests

Documentation

No

@codecov
Copy link

codecov bot commented Feb 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.14%. Comparing base (72629d7) to head (c137a5b).

Additional details and impacted files
@@            Coverage Diff             @@
##             dev-2.x    #7255   +/-   ##
==========================================
  Coverage      72.13%   72.14%           
- Complexity     21085    21090    +5     
==========================================
  Files           2297     2297           
  Lines          85233    85236    +3     
  Branches        8489     8488    -1     
==========================================
+ Hits           61481    61490    +9     
+ Misses         20772    20770    -2     
+ Partials        2980     2976    -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vpaturet vpaturet force-pushed the fix-flex-booking-time-multiday branch from 6f69436 to cc8912b Compare February 2, 2026 04:31
When a bookingTime parameter is provided in flex trip queries, the
requestedBookingTime was calculated once relative to the search date's
start-of-service, then reused for all FlexServiceDate objects across
multiple days. This caused valid trips to be incorrectly filtered out
when the booking time and trip departure were on different days.

Changed FlexServiceDate to store the original Instant and ZoneId, then
calculate seconds-since-start-of-service on-demand relative to each
date's own start-of-service. This ensures booking time comparisons use
the correct reference point for each service date.
@vpaturet vpaturet force-pushed the fix-flex-booking-time-multiday branch from cc8912b to c137a5b Compare February 2, 2026 04:31
@vpaturet vpaturet added the Entur Test This is currently being tested at Entur label Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Entur Test This is currently being tested at Entur

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flexible trips incorrectly filtered when bookingTime parameter spans multiple days

1 participant