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

bugfix: remove *1000 calculations to reintroduce accurate years in alerts in TORA #678

Closed
wants to merge 1 commit into from

Conversation

lightsage88
Copy link
Contributor

This pull request addresses an issue on TORA for Trimet. The issue is such that within the Alerts Body our years for the dates for which alerts have been effective since suddenly increased to wild numbers. In the attached image, you'll see that the years are hundreds of centuries in the future.

This commit includes a tweak that removes the *1000 calculation to the effectiveTime variable in the Alerts-Body file within the ItineraryBody package.

image

Copy link
Collaborator

@miles-grant-ibigroup miles-grant-ibigroup left a comment

Choose a reason for hiding this comment

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

We can't merge this as is, as this would break OTP2 support

@lightsage88
Copy link
Contributor Author

Oh okay, pursuant to the discussion on Slack, is there some way I can inspect within the console whether OTP 1 or 2 is running?

@miles-grant-ibigroup
Copy link
Collaborator

miles-grant-ibigroup commented Nov 3, 2023

Your OTP server hosts a /otp endpoint which reveals all. It'll look something like this
Screenshot 2023-11-03 at 4 49 55 PM

@lightsage88
Copy link
Contributor Author

Oh, so if major is one remove the *1000, otherwise leave it alone?

Is that about the gist of it or am I being too elementary about this?

@miles-grant-ibigroup
Copy link
Collaborator

miles-grant-ibigroup commented Nov 3, 2023

That sounds right to me! The problem is I don't see how this package can easily determine the otp version. I will think on it

@lightsage88
Copy link
Contributor Author

Hmm...well maybe we can pass a variable down from the TORA side that says what OTP we are using and then that attribute can filter down into Alerts Body and dynamically set whether or not we do the *1000 calculation or not.

@miles-grant-ibigroup
Copy link
Collaborator

I'm not a fan of that at all... I think there might be a way to detect OTP1 vs OTP2 based on the itinerary structure.

@lightsage88
Copy link
Contributor Author

I'm not sure how to access the /otp endpoint you speak of...

@lightsage88 lightsage88 closed this Nov 3, 2023
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