-
Notifications
You must be signed in to change notification settings - Fork 133
Creating Service Alerts
The onebusaway-webapp
has an admin page where you can create service alerts that are shared with the OBA mobile apps via the OBA REST API.
To do this, go to the OBA webapp home page, then to "Settings->Admin 'Your powers'->Service Alerts->(Your Transit Agency)". You'll be prompted to login (use your ADMIN account) if you're not currently logged in.
You should now see options to:
- Create a Service Alert
- Remove ALL Service Alerts
To create a Service Alert - Click on "Create a Service Alert", and you'll be shown several fields where you can enter various information about the alerts, such as:
- Summary - (e.g., "Route 5 detour")
- Description - (e.g., "Route 5 is currently being detoured due to emergency construction")
- Reasons - List of a variety of reasons to pick from
- Severity - List of a variety of severity options to pick from
Enter the information you wish, and then click on the "Create" button.
Next, you'll need to specific what is affected by this alert. The webapp currently supports entering two types of alerts:
- System-wide alerts - this will be shown to all users, no matter what route/stop they are searching for transit information for
- Stop-specific alerts - this will be shown to users of the affected stop, when they search for information about that stop
Route-specific alerts should be supported as well, but for some reason haven't worked in my experience (see Known Issues below).
To specify what is affected, click on the "Add Affects Clause" link.
-
To specify a system-wide alert - Enter the agency_id (or agency name, if there is no id in your GTFS agency.txt data) (e.g.,
Hillsborough Area Regional Transit
) in the "Agency Id" box, and click the "Update Affects Clause" button. -
To specify a stop-specific alerts - Enter the agency_id (or agency name, if there is no id in your GTFS agency.txt data) (e.g.,
Hillsborough Area Regional Transit
) in the "Stop Id" box, followed by an underscore (_
) and the stop ID. For example, to specify a service alert for stop 3105 for HART, enter the textHillsborough Area Regional Transit_3105
in the "Stop Id" box. Then, click the "Update Affects Clause" button.
To remove the alert, click the "Delete" link at the bottom of the service alert page. To remove all alerts, return to the main Service Alerts management page and click the "Remove ALL Service Alerts" link.
Note that you'll have to repeat the above process for each machine if you're in a load-balanced environment with more than one onebusaway-webapp instance.
KNOWN ISSUES - If you return to the "Service Alerts" main management page after creating a stop-specific alert, it will not appear in the list of current service alerts. Also, do not enter text in more than one "Affects Clause" field, or no alert will be created.