Skip to content

Commit

Permalink
Link two first columns in Incident admin
Browse files Browse the repository at this point in the history
By default, the first displayed field is linked to the details page. The
first field we show is `source_incident_id` which is optional. When it
is not set there will be no link. Therefore, also link up the second
field (`start_time`) so that we can always easily get to the details
page.
  • Loading branch information
hmpf authored Apr 25, 2024
1 parent 6488afa commit 0be3b6c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions changelog.d/+fix-incident-admin-list-link.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Linked up the second column in the admin incident list to the details view in
addition to the default first column because the first column is currently an
optional field. If the field has no value there can also not be a link.
4 changes: 4 additions & 0 deletions src/argus/incident/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ class IncidentTagRelationInline(admin.TabularInline):
"get_open",
"get_shown",
)
list_display_links = (
"source_incident_id",
"start_time",
)
search_fields = (
"description",
"source_incident_id",
Expand Down

0 comments on commit 0be3b6c

Please sign in to comment.