Skip to content

Projects go Past after a year of inactivity; rename to Past Projects (#1473) - #1475

Open
jonfroehlich wants to merge 2 commits into
masterfrom
1473-project-auto-past
Open

jonfroehlich wants to merge 2 commits into
masterfrom
1473-project-auto-past

Conversation

@jonfroehlich

Copy link
Copy Markdown
Member

Fixes #1473. Stacked on #1472: this branch contains that commit, so merge #1472 first, and this diff then shrinks to its own commit.

Rule (server-side, never written to the DB)

A project is Past when its end_date has passed. Otherwise, it is Past if keep_active is off and its last activity is more than 365 days ago. Last activity = newest publication / talk / poster / video / tagged news date, or start_date (a grace period for new projects). An explicit future end_date keeps a project Active. A project with no signal at all stays Active and shows up in Data Health.

  • ProjectQuerySet.with_activity() / active() / past() and Project.is_past() implement the rule. A test checks that the querysets and the model method agree on every case.
  • end_date is not auto-set. Saving it closes every open ProjectRole, and we'd lose the difference between an editor's date and a guess. has_ended() still means "explicit end date passed", so role auto-closing doesn't fire on inactivity (tested).

Changes

  • Model: new keep_active field ("Keep active (long-running project)"); help text on end_date explaining the rule. A migration is generated at container start.
  • Public pages:
    • The listing, landing page, project-page chip ("Past"/"Active"), "Former" prefixes and people view use the derived status.
    • Date ranges show the last-activity year (e.g., "2014 – 2018") instead of "Present" for inactive-past projects.
    • "Completed Projects" → "Past Projects". Element ids (#completed-projects-section, etc.) are unchanged, so anchors and the JS keep working.
  • Admin: a Keep active field and filter, a Status column (Active / Past (end date) / Past (inactive)), and the Active/Past changelist filter now uses the derived status (old ?active_project_status=Archived links still work).
  • Data Health: new "Projects past by inactivity" check. The leadership check no longer flags dormant projects for having no active PI.
  • Version 2.35.7.

After deploy

Tick Keep active on Project Sidewalk, then review the new Data Health check. For each project: set a real end date, or tick Keep active.

Testing

  • New website/tests/test_project_activity.py:
    • the 365-day boundary;
    • each activity signal;
    • end date wins both ways;
    • keep_active;
    • no signal stays Active;
    • annotation vs. model method;
    • date range;
    • no role auto-close;
    • listing, landing page and chip;
    • the Data Health check.
  • Updated test_project_page.py, test_project.py, test_project_status.py. Full suite passes locally (845 tests).
  • Local pages render (200) with the expected sections, chips and date ranges.
  • Pa11y: 0/16 URLs pass, but the failures are site-wide contrast flags on unchanged elements (the home page has 67, and the plain "Projects" h1 and footer are flagged). The renamed heading gets the same flag as the unchanged "Active Projects" heading. This looks pre-existing and isn't addressed here.
  • Screenshots still needed: the only visible changes are the heading text, the chip word and the end year in date ranges. I couldn't render screenshots in this environment.

🤖 Generated with Claude Code — Opus 5.5, claude-opus-5-5

jonfroehlich and others added 2 commits December 1, 2026 10:02
has_ended(), the projects listing, and the landing page each decided
"active" differently. A project ending today was Completed on the listing
but Active on its page, and one with a future end date was missing from
the landing page. All three now use end_date < localdate() for "ended"
(a project is active through its end date, matching Position), and
has_ended() uses the site's time zone instead of the container clock.

Regression test: website/tests/test_project_status.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A project with no end_date now shows as Past once it has had no new
publication, talk, poster, video, or tagged news item for 365 days
(start_date counts as activity, so new projects get a grace period).
An explicit end_date still wins either way, and a new keep_active flag
keeps long-running projects such as Project Sidewalk Active.

The status is derived on the server (ProjectQuerySet.active()/past() and
Project.is_past(), kept in sync by tests), never written: end_date is not
auto-set because saving it closes every open ProjectRole. has_ended()
keeps meaning "explicit end_date passed" for that reason.

- Projects listing, landing page, project page chip, "Former" prefixes,
  date ranges (last-activity year instead of "Present"), and the people
  view use the derived status.
- "Completed Projects" is renamed "Past Projects"; element ids unchanged.
- Admin: Keep active field and filter, a Status column, and the
  Active/Past changelist filter use the derived status.
- Data Health: new "Projects past by inactivity" check; the leadership
  check no longer flags dormant projects for having no active PI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

Auto-mark projects Past after 12 months of inactivity; rename Completed → Past Projects

1 participant