Skip to content

Fix Broadcast messages not showing in admin console

What does this MR do and why?

  • Firefox does not handle creating a Date object from a string fomatted with -(dashes) as seen in #388926 (closed) in this function
    • Chrome is more forgiving and is not an issue there.
    • converting with a .to_s on the dates produces 2023-02-21 17:06:16 UTC format, whereas the object itself has this format Tue, 21 Feb 2023 17:06:16.000000000 UTC +00:00
  • The dateString format should conform to the ISO 8601 format (YYYY-MM-DDTHH:mm:ss.sssZ) listed in If not, as stated on that page: the parsing behavior with other formats is implementation-defined and may not work across all browsers which is likely what we were observing with the 2023-02-21 17:06:16 UTC that was being passed before with firefox.
    • So while this looks to be fixed with removal of .to_s we'll use .iso8601 format to ensure compliance and also match other places for broadcast message

Screenshots or screen recordings

browser before after
firefox Screen_Shot_2023-02-21_at_2.22.16_PM Screen_Shot_2023-02-21_at_12.46.35_PM
safari same issue as firefox Screen_Shot_2023-02-22_at_10.29.39_AM
chrome Screen_Shot_2023-02-21_at_2.22.49_PM no change

How to set up and validate locally

  1. In Chrome
  2. Go to broadcast messages on your local gdk: http://gdk.test:3000/admin/broadcast_messages
  3. Create a broadcast message.
  4. Notice it listed on http://gdk.test:3000/admin/broadcast_messages
  5. In Firefox:
  6. Go to broadcast messages http://gdk.test:3000/admin/broadcast_messages
  7. Notice the difference between master and this branch on display of broadcast messages

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #388926 (closed)

Edited by Doug Stull

Merge request reports