Skip to content

feat(projects): auto-link a publication's talk/video/poster to its projects (#649)#1372

Merged
jonfroehlich merged 1 commit into
masterfrom
649-propagate-publication-projects
Jun 22, 2026
Merged

feat(projects): auto-link a publication's talk/video/poster to its projects (#649)#1372
jonfroehlich merged 1 commit into
masterfrom
649-propagate-publication-projects

Conversation

@jonfroehlich

Copy link
Copy Markdown
Member

Follow-up to #1370 (the unlinked-artifacts data-health check). You confirmed that in all cases the "parent publication is linked — inherit its projects" rows should inherit — which is correct by definition: a publication's talk/video/poster is the same scholarly artifact, so it belongs to the same projects. This automates exactly those cases.

What

New propagate_publication_projects management command: for every publication that has projects, copy them onto any of its talk / video / poster children that currently have none.

  • Additive-only — never removes a link, never touches a child that already has projects (a deliberate, different linkage is preserved).
  • Idempotent — re-running changes nothing once children are populated.
  • Self-healing — wired into docker-entrypoint.sh (step 4.9) alongside auto_close_project_roles etc., so it runs on every container start. The ~25 current inherit-eligible rows clear on the next deploy, and any future paper whose child is added without a project fixes itself.
  • --dry-run to preview.

This leaves the data-health check showing only the artifacts that genuinely need a human decision (no parent publication to inherit from) — the clean division of labor.

Scope (from the prod snapshot)

~23 videos + 2 talks are childless artifacts of an already-linked publication → auto-linked on next deploy.

Tests

website/tests/test_propagate_publication_projects.py (6 cases): talk/video inherit, skip-already-linked, no-op when parent has no projects, dry-run writes nothing, idempotency. All pass:
python manage.py test website.tests.test_propagate_publication_projects --settings=makeabilitylab.settings_test

Bumps version to 2.17.3. Deferred Tier-2 (artifacts with no parent publication) remains documented in docs/plans/issue-649-link-artifacts-to-projects.md.

🤖 Generated with Claude Code

…ojects (#649)

A publication's child artifacts (the talk that presented it, the teaser video,
the poster) are the same scholarly work, so they belong to the same projects.
Adds propagate_publication_projects, which copies a publication's projects onto
any of its children that currently have none.

- Additive-only: never removes a link, never touches a child that already has
  projects (a deliberate different linkage is preserved).
- Idempotent, so it's wired into docker-entrypoint.sh and self-heals on every
  container start.

This clears the "parent publication is linked -- inherit its projects" rows in
the Artifacts-not-linked-to-a-project data-health check, leaving only the
artifacts that genuinely need a human decision.

Tested in website/tests/test_propagate_publication_projects.py (inherit for
talk/video, skip-already-linked, no-parent-projects no-op, dry-run, idempotency).

Bumps version to 2.17.3.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jonfroehlich jonfroehlich merged commit 88d1941 into master Jun 22, 2026
3 checks passed
@jonfroehlich jonfroehlich deleted the 649-propagate-publication-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.

1 participant