Skip to content

Standardize per-row action links across Data Health checks (#1405)#1406

Merged
jonfroehlich merged 1 commit into
masterfrom
1405-data-health-action-links
Jun 26, 2026
Merged

Standardize per-row action links across Data Health checks (#1405)#1406
jonfroehlich merged 1 commit into
masterfrom
1405-data-health-action-links

Conversation

@jonfroehlich

Copy link
Copy Markdown
Member

Part 1 of #1405 (link standardization). Part 2 (companion checks) is stacked on this branch in a follow-up PR.

What & why

The admin Data Health dashboard is meant to keep admins one click from the fix, but only 3 of 10 checks rendered a per-row Action link. The rest already carried the model's id — they just never built the link. This makes action links universal.

Changes

  • HealthCheck base gains link_model / link_id_key attrs and a default row_link() that deep-links each row to its admin change page.
  • Wired into the 7 linkless checks: publication-quality, duplicate-people, news-health, project-health, project-leadership (default link); position-integrity (person_id key); url-name-collisions (custom link to the Person changelist filtered by the offending url_name).
  • Added url_name to PersonAdmin.search_fields so that filtered ?q= link resolves (also a sensible search improvement on its own).
  • New test pins that every registered check provides an action link, so a future check can't silently ship without one.

The 3 pre-existing custom links (unlinked-artifacts, duplicate-keywords, media-integrity) are unchanged. No model/DB, view, or template changes — the detail template already renders the Action column generically via has_links.

Testing

python manage.py test website --settings=makeabilitylab.settings_test → 576 passing (8 skipped).

🤖 Generated with Claude Code

Every Data Health check now gives each flagged row an admin action link, so
admins stay one click from the fix. Previously only 3 of 10 checks did.

- HealthCheck base gains link_model / link_id_key attrs and a default
  row_link() that deep-links a row to its admin change page.
- Wire the 7 linkless checks in: publication-quality, duplicate-people,
  news-health, project-health, project-leadership (default link),
  position-integrity (person_id key), and url-name-collisions (custom link
  to the Person changelist filtered by the offending url_name).
- Add url_name to PersonAdmin.search_fields so that filtered link resolves.
- Test pins that every registered check provides an action link.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jonfroehlich jonfroehlich merged commit f3fdc49 into master Jun 26, 2026
3 checks passed
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.

1 participant