Skip to content

One active/ended rule for projects (#1471) - #1472

Open
jonfroehlich wants to merge 1 commit into
masterfrom
1471-project-status-consistency
Open

jonfroehlich wants to merge 1 commit into
masterfrom
1471-project-status-consistency

Conversation

@jonfroehlich

Copy link
Copy Markdown
Member

Fixes #1471.

What

Project.has_ended(), the projects listing, and the landing page now use the same rule: a project has ended once end_date < timezone.localdate(). It is active through its end date, matching Position.

  • views/project_listing.py: active end_date >= today, completed end_date < today (was > / <=).
  • views/index.py: landing page includes projects with a future end date (was end_date IS NULL only).
  • models/project.py: has_ended() uses timezone.localdate() (site time zone) instead of date.today() (container clock).
  • Version bumped to 2.35.6.

Tests

New website/tests/test_project_status.py covers no end date, a future end date, an end date of today, and a past end date across all three call sites. It failed on the listing and landing-page cases before the fix. Full suite passes locally (832 tests).

No UI markup changed, so no screenshots.

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

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>

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.

Project active/completed status disagrees between project page, listing, and landing page

1 participant