Skip to content

Do not return a leg from a leg reference, if trip does not exist on date#4758

Merged
hannesj merged 1 commit into
opentripplanner:dev-2.xfrom
entur:otp2_check_date_in_leg_reference
Jan 26, 2023
Merged

Do not return a leg from a leg reference, if trip does not exist on date#4758
hannesj merged 1 commit into
opentripplanner:dev-2.xfrom
entur:otp2_check_date_in_leg_reference

Conversation

@hannesj

@hannesj hannesj commented Jan 23, 2023

Copy link
Copy Markdown
Contributor

Summary

Currently we return a leg from a leg reference irrespective of whether the trip is actually running on the date in the reference. Check this when reconstructing the leg and return null, if the trip is not in service on the date.

This problem occurs, when the underlying transit data changes, and a specific trip does not run anymore on the service date. This currently only affects the leg query in the Transmodel API.

@hannesj hannesj added the !Bug Apply to issues describing a bug and PRs witch fixes it. label Jan 23, 2023
@hannesj hannesj added this to the 2.3 milestone Jan 23, 2023
@hannesj
hannesj requested a review from a team as a code owner January 23, 2023 15:56
@codecov

codecov Bot commented Jan 23, 2023

Copy link
Copy Markdown

Codecov Report

Base: 61.83% // Head: 61.83% // Decreases project coverage by -0.01% ⚠️

Coverage data is based on head (8002705) compared to base (bf3086d).
Patch coverage: 50.00% of modified lines in pull request are covered.

Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #4758      +/-   ##
=============================================
- Coverage      61.83%   61.83%   -0.01%     
  Complexity     12713    12713              
=============================================
  Files           1612     1612              
  Lines          64614    64618       +4     
  Branches        7019     7020       +1     
=============================================
+ Hits           39953    39955       +2     
- Misses         22410    22411       +1     
- Partials        2251     2252       +1     
Impacted Files Coverage Δ
...lan/legreference/ScheduledTransitLegReference.java 75.00% <50.00%> (-5.00%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@hannesj
hannesj requested a review from Bartosz-Kruba January 24, 2023 10:26
@hannesj
hannesj merged commit 78bc92a into opentripplanner:dev-2.x Jan 26, 2023
@hannesj
hannesj deleted the otp2_check_date_in_leg_reference branch January 26, 2023 10:11
t2gran pushed a commit that referenced this pull request Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

!Bug Apply to issues describing a bug and PRs witch fixes it.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants