Fix SIRI ET ExtraJourney trips not appearing in departure/arrival boards #7052
+19
−3
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.
Summary
SIRI ET ExtraJourney trips (real-time added trips) were successfully created and could be queried directly by trip ID, but they did not appear in departure/arrival board queries at stops. This PR fixes the issue by ensuring ExtraJourney patterns are properly indexed for stop-based queries.
THIS PR NEEDS TO BE DISCUSSED - I DISCUSSED THIS WITH VINCENT AND WE ARE NOT 100% SURE THIS IS THE RIGHT FIX.
Issue
Fixes #7008
Root Cause
The
AddedTripBuildercreatedTripPatternobjects for ExtraJourneys without setting thecreatedByRealtimeUpdaterflag. This causedTimetableSnapshot.addPatternToIndex()to skip indexing these patterns in thepatternsForStopmultimap, which is used by departure board queries.Code Flow
StopTimesHelper.getTripTimesForStop()transitService.findPatterns(stop, true)(with realtime flag)DefaultTransitService.findPatterns()→timetableSnapshot.getPatternsForStop(stop)patternsForStopmultimapWhy the flag matters