openplans/OpenTripPlanner — Issue #581: GTFS-rt alerts
Author: fpurcell
Created: 2012-01-04 16:01:10+00:00
State: open
Labels: api, webapp

Two improvements needed:

1. For alerts that are in the future, these alerts should show up on an itinerary that is planned in that future...in the email thread below, an alert for MLK day is available with a start date on 1/16/2012. Planning a trip on that date should reveal the MLK day alert. http://rtp.trimet.org/?date=1/16/2012.

2. The system should also have the ability to include future alerts in the web service response (via a config element in the .xml used to configure the alert service content)). The web service response should include a data element that indicates this alert is for a date. And finally, the web UI should have a second config.js element to show/hide future alerts; when 'shown', future alerts will be separated (with the localized header 'Future Alerts') from the list of current alerts.

________________________________________
From: David Turner [novalis@novalis.org]
Sent: Tuesday, January 03, 2012 7:16 PM
To: Purcell, Frank
Subject: Re: GTFS-rt alerts ... date, show all?

The start date of the alert is in the future. OTP treats dates as dates
on which to show the alert, rather than dates for which the alert
applies, as the latter can be done in text while the former cannot.

On Wed, 2012-01-04 at 02:30 +0000, Purcell, Frank wrote:
> Hey Dave,
>
> I'm not seeing some alerts from
> http://developer.trimet.org/ws/V1/FeedSpecAlerts/appid/270FE4740FD758B33BE454622?includeFuture=true&text=true. The start date of the alerts is in the future (on MLK day), but we’d like to show them before that time. My guess (minimal research on this) is that we’ve got a date issue…a second theory would be multiple routes are assigned to the same alert, the code doesn't like that. Either way, I’m wondering if you have any ideas, or quick fixes (switch / config to turn on all alerts, regardless of start time). Note that this is a normal (to low) priority at this point, so no panic here…but will get a ticket going if we need new functionality.
>
>
>
> Thanks,
>
> Frank
>
>
>
> E.g., this alert works fine:
>
> entity {
>
> id: "22498"
>
> alert {
>
> active_period {
>
> start: 1309251600
>
> end: 2138294100
>
> }
>
> informed_entity {
>
> route_id: "6"
>
> route_type: 3
>
> }
>
> url {
>
> translation {
>
> text: "http://trimet.org/alerts/"
>
> }
>
> }
>
> description_text {
>
> translation {
>
> text: "Stop ID 2165 on NE Grand at Broadway is closed for
> construction."
>
> }
>
> }
>
> }
>
> }
>
>
>
> Whereas this alert does not show (note, start time is Jan 16th @ 2:am
> -- http://www.esqsoft.com/javascript_examples/date-to-epoch.htm):
>
> entity {
>
> id: "23097"
>
> alert {
>
> active_period {
>
> start: 1326708000
>
> end: 1326798000
>
> }
>
> informed_entity {
>
> route_id: "100"
>
> route_type: 1
>
> }
>
> informed_entity {
>
> route_id: "200"
>
> route_type: 1
>
> }
>
> informed_entity {
>
> route_id: "90"
>
> route_type: 1
>
> }
>
> informed_entity {
>
> route_id: "190"
>
> route_type: 1
>
> }
>
> url {
>
> translation {
>
> text: "http://trimet.org/alerts/"
>
> }
>
> }
>
> description_text {
>
> translation {
>
> text: "On January 16, Martin Luther King Jr. Day, MAX trains
> will run on regular weekday schedules. WES Commuter Rail, Portland
> Streetcar and many bus lines will also run on regular weekday
> schedules. Some line will be canceled or run on Saturday schedules.
> TriMet customer service offices will be closed.."
>
> }
>
> }
>
> }
>
> }
>
>