Skip to content

feat(admin): data-health check for unlinked artifacts (#649)#1370

Merged
jonfroehlich merged 1 commit into
masterfrom
649-link-artifacts-to-projects
Jun 22, 2026
Merged

feat(admin): data-health check for unlinked artifacts (#649)#1370
jonfroehlich merged 1 commit into
masterfrom
649-link-artifacts-to-projects

Conversation

@jonfroehlich

Copy link
Copy Markdown
Member

Closes #649.

What & why

As the lab keeps adding projects, older talks/papers/videos/posters need to be linked back to the projects they belong to. Rather than a one-off data-entry sprint that silently rots, this adds a read-only Data Health check so the backlog stays visible and shrinks over time.

Scope (from a prod snapshot, 2026-06-14): 197 artifacts have no project; 81 are pre-2012 (pre-Makeability-Lab grad work) and excluded, leaving 116 actionable. ~25 of those are children of an already-linked publication and can simply inherit its projects.

The check (/admin/data-health/ → "Artifacts not linked to a project")

  • Lists every unlinked talk / paper / video / poster, excluding artifacts dated before settings.DATE_MAKEABILITYLAB_FORMED (same cutoff the publications view uses).
  • Flags rows whose parent publication is already linked — quickest wins (inherit its projects).
  • Each row deep-links to the artifact's admin edit page to add the project inline.
  • CSV export; strictly read-only (no .save()).
  • Registered in the data-health checks package; mirrors the existing HealthCheck pattern.

UI fix

Row-action buttons were wrapping mid-word in the narrow Action column. Added white-space: nowrap to data-health row-action buttons in the shared detail.html (also helps existing checks like "Merge in admin →"); table scrolls horizontally if needed. Shortened this check's label to "Open →".

Before: the "Open & link →" button wrapped to two lines and overflowed the cell (see issue thread screenshot).
After: single-line "Open →" button, no wrap.

Tests

website/tests/test_unlinked_artifacts_check.py (6 cases): flagging, linked-artifact exclusion, pre-lab exclusion, parent-publication inherit note, orphan-no-note, and the admin deep-link. All pass:
python manage.py test website.tests.test_unlinked_artifacts_check --settings=makeabilitylab.settings_test

Deferred (not in this PR)

A semi-automated matching pipeline (suggest links via shared authors + keyword/title/date overlap → review CSV → bulk apply) is scoped in docs/plans/issue-649-link-artifacts-to-projects.md but not built — author overlap alone is too ambiguous. Holding unless the manual route proves too slow.

Bumps version to 2.17.1.

🤖 Generated with Claude Code

…649)

Adds a read-only "Artifacts not linked to a project" Data Health check at
/admin/data-health/ so the backlog of unlinked talks, papers, videos, and
posters stays visible and shrinks over time instead of living in a one-off
issue.

- Excludes pre-Makeability-Lab work (date < settings.DATE_MAKEABILITYLAB_FORMED),
  reusing the same cutoff the publications view already applies.
- Flags rows whose parent publication is already linked — those can simply
  inherit its projects (quickest wins).
- Each row deep-links to the artifact's admin edit page to add the project
  inline; CSV export; strictly read-only.
- Keeps data-health row-action buttons (e.g. "Open ->") from wrapping mid-word
  in a narrow column (shared detail.html style; also helps existing checks).

Regression-tested in website/tests/test_unlinked_artifacts_check.py. Scope and
a deferred semi-automated matching pipeline are documented in
docs/plans/issue-649-link-artifacts-to-projects.md.

Bumps version to 2.17.1.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jonfroehlich jonfroehlich merged commit 09d6f2f into master Jun 22, 2026
3 checks passed
@jonfroehlich jonfroehlich deleted the 649-link-artifacts-to-projects branch June 22, 2026 20:36
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.

Need to go back through old talks/papers and link to projects

1 participant