From c5657e587e880a0b9e4e927d6933dd7352dd9dc1 Mon Sep 17 00:00:00 2001 From: KaylaBrady <31781298+KaylaBrady@users.noreply.github.com> Date: Mon, 30 Mar 2026 09:43:48 -0400 Subject: [PATCH 1/4] doc: Update closed_timestamp doc --- apps/api_web/lib/api_web/controllers/alert_controller.ex | 8 ++++---- apps/model/lib/model/alert.ex | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/api_web/lib/api_web/controllers/alert_controller.ex b/apps/api_web/lib/api_web/controllers/alert_controller.ex index c210d56e..00b820c8 100644 --- a/apps/api_web/lib/api_web/controllers/alert_controller.ex +++ b/apps/api_web/lib/api_web/controllers/alert_controller.ex @@ -401,7 +401,7 @@ defmodule ApiWeb.AlertController do closed_timestamp( nullable(%Schema{type: :string, format: :"date-time"}, true), - "If the alert has been closed and an all clear notification should be sent, the time at which the alert was closed.", + "The time at which the alert was closed.", example: "2025-08-17T11:21:00-04:00" ) @@ -474,7 +474,7 @@ defmodule ApiWeb.AlertController do last_push_notification_timestamp( nullable(%Schema{type: :string, format: :"date-time"}, true), - "The most recent time at which the alert changed significantly enough that a notification should be sent.", + "The most recent time at which the alert changed significantly enough that a notification should be sent. When this matches closed_timestamp, an \"All Clear\" notification should be sent.", example: "2025-08-17T11:23:00-04:00" ) @@ -615,8 +615,8 @@ defmodule ApiWeb.AlertController do | JSON pointer | Description | |-----------------------------------------------------------------|-----------------------------------------------------| - | `#{parent_pointer}/attributes/closed_timestamp` | Time to send an all clear notification | - | `#{parent_pointer}/attributes/last_push_notification_timestamp` | Time to send a new or updated alert notification | + | `#{parent_pointer}/attributes/closed_timestamp` | Time the alert was closed. | + | `#{parent_pointer}/attributes/last_push_notification_timestamp` | Time to send a new or updated alert notification. Send an "all clear" if equal to closed_timestamp. | | `#{parent_pointer}/attributes/reminder_times` | Times to send upcoming alert reminder notifications | """ end diff --git a/apps/model/lib/model/alert.ex b/apps/model/lib/model/alert.ex index dee0e384..1307f652 100644 --- a/apps/model/lib/model/alert.ex +++ b/apps/model/lib/model/alert.ex @@ -253,7 +253,7 @@ defmodule Model.Alert do * `:active_period` - See `t:datetime_pair/0` for individual entries in list. * `:banner` - Set if alert is meant to be displayed prominently, such as the top of every page. * `:cause` - Cause of the alert. See `t:cause/0` for all names and values. - * `:closed_timestamp` - If the alert has been closed and an all clear notification should be sent, the time at which the alert was closed. + * `:closed_timestamp` - The time at which the alert was closed. * `:create` - When the alert was created, which is completely unrelarted to the `active_period`s. * `:description` - This plain-text string will be formatted as the body of the alert (or shown on an explicit "expand" request by the user). The information in the description should add to the information of the header. See @@ -269,6 +269,7 @@ defmodule Model.Alert do * `:informed_entity` - Entities whose users we should notify of this alert. See [GTFS Realtime `FeedMessage` `FeedEntity` `Alert` `informed_entity`](https://github.com/google/transit/blob/master/gtfs-realtime/spec/en/reference.md#message-alert) * `:last_push_notification_timestamp` - The most recent time at which the alert changed significantly enough that a notification should be sent. + When this matches `closed_timestamp`, an \"All Clear\" notification should be sent * `:lifecycle` - Enumeration of where the alert is in its lifecycle. See `t:lifecycle/0`. * `:reminder_times` - Times at which a reminder notification should be sent. * `:service_effect` - Summarizes the service and the impact to that service. From e856be1772b0061a523f9c190cb60b0ab463498a Mon Sep 17 00:00:00 2001 From: KaylaBrady <31781298+KaylaBrady@users.noreply.github.com> Date: Wed, 1 Apr 2026 10:00:42 -0400 Subject: [PATCH 2/4] style: update notifications ascii table --- .../lib/api_web/controllers/alert_controller.ex | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/apps/api_web/lib/api_web/controllers/alert_controller.ex b/apps/api_web/lib/api_web/controllers/alert_controller.ex index 00b820c8..85ac05f2 100644 --- a/apps/api_web/lib/api_web/controllers/alert_controller.ex +++ b/apps/api_web/lib/api_web/controllers/alert_controller.ex @@ -613,11 +613,16 @@ defmodule ApiWeb.AlertController do There are 3 notifications related attributes - | JSON pointer | Description | - |-----------------------------------------------------------------|-----------------------------------------------------| - | `#{parent_pointer}/attributes/closed_timestamp` | Time the alert was closed. | - | `#{parent_pointer}/attributes/last_push_notification_timestamp` | Time to send a new or updated alert notification. Send an "all clear" if equal to closed_timestamp. | - | `#{parent_pointer}/attributes/reminder_times` | Times to send upcoming alert reminder notifications | + +================================================================+=====================================================+ + | JSON Pointer | Description | + +================================================================+=====================================================+ + | `#{parent_pointer}/attributes/closed_timestamp` | Time the alert was closed. | + +----------------------------------------------------------------+-----------------------------------------------------+ + | `#{parent_pointer}/attributes/last_push_notification_timestamp | Time to send a new or updated alert notification. | + | | Send an "all clear" if equal to closed_timestamp. | + +----------------------------------------------------------------+-----------------------------------------------------+ + | `#{parent_pointer}/attributes/reminder_times` | Times to send upcoming alert reminder notifications | + +----------------------------------------------------------------+-----------------------------------------------------+ """ end From 486fdc756f41b7ef8a948240f7019e87690c46f5 Mon Sep 17 00:00:00 2001 From: KaylaBrady <31781298+KaylaBrady@users.noreply.github.com> Date: Wed, 1 Apr 2026 10:27:10 -0400 Subject: [PATCH 3/4] Revert "style: update notifications ascii table" This reverts commit e856be1772b0061a523f9c190cb60b0ab463498a. --- .../lib/api_web/controllers/alert_controller.ex | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/apps/api_web/lib/api_web/controllers/alert_controller.ex b/apps/api_web/lib/api_web/controllers/alert_controller.ex index 85ac05f2..00b820c8 100644 --- a/apps/api_web/lib/api_web/controllers/alert_controller.ex +++ b/apps/api_web/lib/api_web/controllers/alert_controller.ex @@ -613,16 +613,11 @@ defmodule ApiWeb.AlertController do There are 3 notifications related attributes - +================================================================+=====================================================+ - | JSON Pointer | Description | - +================================================================+=====================================================+ - | `#{parent_pointer}/attributes/closed_timestamp` | Time the alert was closed. | - +----------------------------------------------------------------+-----------------------------------------------------+ - | `#{parent_pointer}/attributes/last_push_notification_timestamp | Time to send a new or updated alert notification. | - | | Send an "all clear" if equal to closed_timestamp. | - +----------------------------------------------------------------+-----------------------------------------------------+ - | `#{parent_pointer}/attributes/reminder_times` | Times to send upcoming alert reminder notifications | - +----------------------------------------------------------------+-----------------------------------------------------+ + | JSON pointer | Description | + |-----------------------------------------------------------------|-----------------------------------------------------| + | `#{parent_pointer}/attributes/closed_timestamp` | Time the alert was closed. | + | `#{parent_pointer}/attributes/last_push_notification_timestamp` | Time to send a new or updated alert notification. Send an "all clear" if equal to closed_timestamp. | + | `#{parent_pointer}/attributes/reminder_times` | Times to send upcoming alert reminder notifications | """ end From 5b700612be349508d0777085e7fdf11412ca8f70 Mon Sep 17 00:00:00 2001 From: KaylaBrady <31781298+KaylaBrady@users.noreply.github.com> Date: Wed, 1 Apr 2026 10:28:29 -0400 Subject: [PATCH 4/4] style: notifications ascii table wide mode --- apps/api_web/lib/api_web/controllers/alert_controller.ex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/api_web/lib/api_web/controllers/alert_controller.ex b/apps/api_web/lib/api_web/controllers/alert_controller.ex index 00b820c8..ab27858c 100644 --- a/apps/api_web/lib/api_web/controllers/alert_controller.ex +++ b/apps/api_web/lib/api_web/controllers/alert_controller.ex @@ -613,11 +613,11 @@ defmodule ApiWeb.AlertController do There are 3 notifications related attributes - | JSON pointer | Description | - |-----------------------------------------------------------------|-----------------------------------------------------| - | `#{parent_pointer}/attributes/closed_timestamp` | Time the alert was closed. | + | JSON pointer | Description | + |-----------------------------------------------------------------|-------------------------------------------------------------------------------------------------------| + | `#{parent_pointer}/attributes/closed_timestamp` | Time the alert was closed. | | `#{parent_pointer}/attributes/last_push_notification_timestamp` | Time to send a new or updated alert notification. Send an "all clear" if equal to closed_timestamp. | - | `#{parent_pointer}/attributes/reminder_times` | Times to send upcoming alert reminder notifications | + | `#{parent_pointer}/attributes/reminder_times` | Times to send upcoming alert reminder notifications | """ end