Skip to content

Show and sort incidents without an occurred time by their created time in the dashboard - #498

Open
jayhemnani9910 wants to merge 1 commit into
cachethq:mainfrom
jayhemnani9910:fix/dashboard-incident-time-fallback
Open

jayhemnani9910 wants to merge 1 commit into
cachethq:mainfrom
jayhemnani9910:fix/dashboard-incident-time-fallback

Conversation

@jayhemnani9910

Copy link
Copy Markdown
Contributor

Fixes #495.

The incident form says the created time is used when "Occurred at" is left empty, and Incident::timestamp does that, but the dashboard read the raw column. Such an incident showed an empty time in the Incidents list and the "Open incidents" widget and was sorted below older incidents, so the newest one ended up last.

Both tables now show timestamp and sort by coalesce(occurred_at, created_at), including the list's column sort.

Tested: new tests in IncidentResourceTest and OpenIncidentsTest (an incident without "Occurred at" is listed before an older one and shows its created time) fail on main and pass with the change. Full suite in a local PHP 8.5 container: the same 71 environment failures on main and on this branch. Pint passes.

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.

Incident without Occurred at shows a blank time and sorts last in the dashboard

1 participant