Repository navigation
One active/ended rule for projects (#1471) - #1472
Open
jonfroehlich wants to merge 1 commit into
Open
jonfroehlich wants to merge 1 commit into
jonfroehlich wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1471.
What
Project.has_ended(), the projects listing, and the landing page now use the same rule: a project has ended onceend_date < timezone.localdate(). It is active through its end date, matchingPosition.views/project_listing.py: activeend_date >= today, completedend_date < today(was>/<=).views/index.py: landing page includes projects with a future end date (wasend_date IS NULLonly).models/project.py:has_ended()usestimezone.localdate()(site time zone) instead ofdate.today()(container clock).Tests
New
website/tests/test_project_status.pycovers 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