Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fare calculation for combined interlined legs #5408

Merged

Conversation

leonardehrenfried
Copy link
Member

@leonardehrenfried leonardehrenfried commented Oct 9, 2023

Summary

This fixes a problem when interlined legs area combined for fare calculation purposes: the fare products are associated to the wrong legs because the combined leg is not "deconstructed" into its parts when returning the results.

@binh-dam-ibigroup: this bugfix is relevant when Houston and SEPTA are going migrate the new Fares API.

Unit tests

Added.

Documentation

Javadoc added.

@leonardehrenfried leonardehrenfried added the IBI Developed by or important for IBI Group label Oct 9, 2023
@leonardehrenfried leonardehrenfried requested a review from a team as a code owner October 9, 2023 12:57
@codecov
Copy link

codecov bot commented Oct 9, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (bdfda72) 66.59% compared to head (941b2bd) 66.59%.
Report is 16 commits behind head on dev-2.x.

Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #5408      +/-   ##
=============================================
- Coverage      66.59%   66.59%   -0.01%     
- Complexity     15285    15286       +1     
=============================================
  Files           1790     1790              
  Lines          69384    69392       +8     
  Branches        7307     7309       +2     
=============================================
+ Hits           46207    46210       +3     
- Misses         20700    20703       +3     
- Partials        2477     2479       +2     
Files Coverage Δ
...r/ext/fares/impl/CombinedInterlinedTransitLeg.java 57.69% <100.00%> (+1.69%) ⬆️
...tripplanner/ext/fares/impl/DefaultFareService.java 92.19% <100.00%> (+0.11%) ⬆️
.../main/java/org/opentripplanner/model/plan/Leg.java 77.92% <ø> (ø)

... and 2 files with indirect coverage changes

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

@t2gran t2gran added this to the 2.5 (next release) milestone Oct 10, 2023
@leonardehrenfried leonardehrenfried merged commit 83c4584 into opentripplanner:dev-2.x Oct 12, 2023
5 checks passed
t2gran pushed a commit that referenced this pull request Oct 12, 2023
@leonardehrenfried leonardehrenfried deleted the fix-septa-calculator branch October 12, 2023 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug IBI Developed by or important for IBI Group Sandbox
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants