Trip Planner [fix]: Trip Planner fares bug with bus/subway/CR transfers#3201
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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
Branch
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.