Skip to content

Rename project date fields: close_date → winners_announced_date, forecasting_end_date → close_date - #4741

Draft
SylvainChevalier wants to merge 3 commits into
mainfrom
claude/issue-4394-rename-project-fields-date-fields
Draft

Rename project date fields: close_date → winners_announced_date, forecasting_end_date → close_date#4741
SylvainChevalier wants to merge 3 commits into
mainfrom
claude/issue-4394-rename-project-fields-date-fields

Conversation

@SylvainChevalier

Copy link
Copy Markdown
Contributor

Closes #4394.

Summary

Align backend naming with user-facing labels:

  • close_date (deadline / prizes paid) → winners_announced_date
  • forecasting_end_date (last scored question close) → close_date
  • Improved help_text on both fields per @skmmcj's wording
  • Renamed move_project_forecasting_end_datemove_project_close_date
  • Frontend types, components, mock data, sort enum, and i18n placeholders updated
  • Migration 0024 swaps the two columns via a temporary name

Test plan

  • manage.py migrate applies cleanly on a fresh DB and on a DB migrated up to 0023
  • Tournament list page renders with the “Ending soon” sort (now winners_announced_date)
  • Tournament detail “Winners announced” row still appears in the stats dropdown
  • Approving a question past the tournament close date still triggers the “move date” modal
  • Frontend typecheck passes
  • Backend tests pass

Generated with Claude Code

…ecasting_end_date -> close_date

The previous naming was confusing because the field labelled "Closes" on the front
end was named `forecasting_end_date` in the backend, while `close_date` actually
referred to the wrap-up / prize payout date displayed as "Winners announced date".

This commit aligns the backend with the user-facing language:
- close_date (deadline / prizes paid) -> winners_announced_date
- forecasting_end_date (last scored question close) -> close_date
- Improved help_text on both fields
- Renamed move_project_forecasting_end_date -> move_project_close_date
- Updated all backend references, frontend types/components, mock data, and i18n
  placeholder name (English copy fully updated; other locales updated to use the
  new placeholder so they remain functional pending translation refresh).

Includes migration 0024 that swaps the two columns via a temporary name.

Refs #4394

Co-authored-by: Sylvain <SylvainChevalier@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented May 18, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 7485d1e2-98e1-4de5-8380-622384b11bd1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/issue-4394-rename-project-fields-date-fields

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented May 18, 2026

Copy link
Copy Markdown
Contributor

Cleanup: Preview Environment Removed (Stale)

This preview environment was fully removed because the PR was marked as Stale (no activity detected).

Resource Status
🌐 Preview App Deleted
🗄️ PostgreSQL Branch Deleted
⚡ Redis Database Deleted
🔧 GitHub Deployments Removed
📦 Docker Image Retained (auto-cleanup via GHCR policies)

Push a new commit to this PR to recreate the preview environment.


Automated cleanup by weekly maintenance

@hlbmtc

hlbmtc commented May 19, 2026

Copy link
Copy Markdown
Contributor

This needs to be carefully reviewed & tested. Also, we should keep old field ref in serializers for backward compatibility in case someone is using our projects API

@hlbmtc
hlbmtc self-requested a review May 19, 2026 11:24
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will not be closed automatically, but please consider updating it or closing it if it is no longer relevant.

@github-actions github-actions Bot added the Stale label Jun 19, 2026
@SylvainChevalier

Copy link
Copy Markdown
Contributor Author

@claude unit tests fail

@claude

claude Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Claude finished @SylvainChevalier's task in 18m 4s —— View job


Fixed failing checks

Commit: d59713d

The failing Run Unit Tests workflow had 3 non-test failures — pytest itself was green (722 passed). Root causes and fixes:

  1. Frontend Prettier — ran bun run format, which rewrote 3 files:

    • front_end/src/app/(main)/(tournaments)/tournament/components/header_block_info.tsx
    • front_end/src/app/(main)/(tournaments)/tournaments/components/tournaments_grid/live_tournament_card.tsx
    • front_end/src/app/(main)/questions/[id]/components/post_approval_modal.tsx
  2. Backend Ruff format — I couldn't install ruff/uv in this sandbox, so I hand-formatted 3 files to match Ruff/Black style (line-length 88):

    • projects/admin.py:374,923 — wrapped over-88 lines
    • projects/services/common.py:213-215,229-231,246-248,352-354 — wrapped over-88 lines; also collapsed two boolean groups that fit now that close_date is shorter than forecasting_end_date
    • scoring/utils.py:604 — split the long then=(at_time.year - ExtractYear(...)) across lines
  3. makemigrations --check — the PR edited Leaderboard.finalize_time.help_text (close_datewinners_announced_date) but didn't create a migration. Added scoring/migrations/0022_alter_leaderboard_finalize_time.py.

Please re-run the workflow. If Ruff still complains about a formatting detail on the 3 Python files, ping me and I'll iterate — my hand-format was a best-guess since I couldn't run Ruff locally here.

Also — @hlbmtc's earlier note about backward-compat aliases for close_date / forecasting_end_date in the projects API serializers is not covered by this PR yet; happy to tackle it in a follow-up if you'd like.
· Branch: claude/issue-4394-rename-project-fields-date-fields

claude Bot and others added 2 commits August 7, 2026 13:41
- Reformat 3 frontend files with Prettier
- Reformat 3 Python files to match Ruff/Black style after the rename
- Add scoring/migrations/0022 for the Leaderboard.finalize_time help_text change

Co-authored-by: Sylvain <74110469+SylvainChevalier@users.noreply.github.com>
…ame-project-fields-date-fields

# Conflicts:
#	front_end/src/app/(main)/(tournaments)/tournaments/components/tournaments_grid/live_tournament_card.tsx
#	front_end/src/components/posts_feed/feed_tournament_tile.tsx
@lsabor

lsabor commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

I think the current state works (I resolved merge conflicts and reviewed). But the main point I'd like to make is that with the two changes:

  • close_date -> winners_announced_date
  • forecasting_end_date -> close_date

We've introduced a very real possibility that someone will read the new close_date and think it's the old close_date. I suppose it's not super costly, but I'd prefer to avoid the name conflict. Namely, I'd recommend that forecasting_end_date isn't renamed. If it needs to be renamed, we can name it close_time or tournament_close_date to sidestep the collision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename project fields date fields so they aren't confusing

3 participants