Skip to content

Trip Planner [fix]: Trip Planner fares bug with bus/subway/CR transfers#3201

Merged
lvachon1 merged 1 commit into
mainfrom
lev/fix/otp/tripod_trips_transfer_total
May 22, 2026
Merged

Trip Planner [fix]: Trip Planner fares bug with bus/subway/CR transfers#3201
lvachon1 merged 1 commit into
mainfrom
lev/fix/otp/tripod_trips_transfer_total

Conversation

@lvachon1
Copy link
Copy Markdown
Contributor

@lvachon1 lvachon1 commented May 21, 2026

Scope

Asana Ticket: 🐞 Investigate Trip Planner fares bug with bus/subway/CR transfers

Implementation

Fixed bug where three leged trips didn't consider if the commuter rail was present when computing if transfers are allowed. Added a function to check if any leg of a tripod-trip happens on :RAIL and therefore disqualify it as potential free transfer between the other two legs.

Screenshots

Dev

Screenshot 2026-05-21 at 12 08 14 PM

Branch

Screenshot 2026-05-21 at 12 08 04 PM

How to test

Original test case

http://localhost:4001/trip-planner?plan=hsQVX3VudXNlZF9kYXRldGltZV90eXBlxADEEl91bnVzZWRfd2hlZWxjaGFpcsQAxAhkYXRldGltZcQgMjAyNi0wNS0yMVQxMTo0MDo1Ny4wMzc5MzgtMDQ6MDDEBGZyb22ExARuYW1lxBVGZWxsc3dheSBXIEAgUGFyaXMgU3TECGxhdGl0dWRly0BFNmxD9fkWxAlsb25naXR1ZGXLwFHGOVxCIDbEB3N0b3BfaWTEBDgzMDXEBW1vZGVzicQDQlVTxAR0cnVlxAVGRVJSWcQEdHJ1ZcQEUkFJTMQEdHJ1ZcQGU1VCV0FZxAR0cnVlxA5fcGVyc2lzdGVudF9pZMQBMMQLX3VudXNlZF9CVVPEAMQNX3VudXNlZF9GRVJSWcQAxAxfdW51c2VkX1JBSUzEAMQOX3VudXNlZF9TVUJXQVnEAMQCdG-ExARuYW1lxAhFbmRpY290dMQIbGF0aXR1ZGXLQEUd2xptaZDECWxvbmdpdHVkZcvAUconRb8m8sQHc3RvcF9pZMQNcGxhY2UtRkItMDEwOQ==

New case that coincidentally applies as well

http://localhost:4001/trip-planner?plan=hsQVX3VudXNlZF9kYXRldGltZV90eXBlxADEEl91bnVzZWRfd2hlZWxjaGFpcsQAxAhkYXRldGltZcQgMjAyNi0wNS0yMVQxMjoxNTowNC42ODI3NzEtMDQ6MDDEBGZyb22DxARuYW1lxC5XZ2JoLCAxIEd1ZXN0IFN0cmVldCwgQnJpZ2h0b24sIE1BLCAwMjEzNSwgVVNBxAhsYXRpdHVkZctARS2bPQfIS8QJbG9uZ2l0dWRly8BRyYPPLPldxAVtb2Rlc4nEA0JVU8QEdHJ1ZcQFRkVSUlnEBHRydWXEBFJBSUzEBHRydWXEBlNVQldBWcQEdHJ1ZcQOX3BlcnNpc3RlbnRfaWTEATDEC191bnVzZWRfQlVTxADEDV91bnVzZWRfRkVSUlnEAMQMX3VudXNlZF9SQUlMxADEDl91bnVzZWRfU1VCV0FZxADEAnRvg8QEbmFtZcQwTW9udGVsbG8sIDE1MCBTcGFyayBTdCwgQnJvY2t0b24sIE1BLCAwMjMwMSwgVVNBxAhsYXRpdHVkZctARQ2chC-lCcQJbG9uZ2l0dWRly8BRwWV_tpmF

Confirm that the fare is adding the commuter rail leg correctly, unlike on dev.

…l was present when computing if transfers are allowed. Added a function to check if any leg of a tripod-trip happens on :RAIL and therefore disqualify it as potential free transfer between the other two legs.
@lvachon1 lvachon1 requested a review from a team as a code owner May 21, 2026 16:15
@lvachon1 lvachon1 requested a review from joshlarson May 21, 2026 16:15
@lvachon1 lvachon1 changed the title Trip Planner [fix]: Fix out of system transfer logic Trip Planner [fix]: Trip Planner fares bug with bus/subway/CR transfers May 21, 2026
Copy link
Copy Markdown
Contributor

@joshlarson joshlarson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💸

@lvachon1 lvachon1 merged commit da8cd74 into main May 22, 2026
26 checks passed
@lvachon1 lvachon1 deleted the lev/fix/otp/tripod_trips_transfer_total branch May 22, 2026 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants