Conversation
There was a problem hiding this comment.
Pull request overview
Updates winter-fee propagation and season-save workflow so that editing regular-season operation dates can also trigger recalculation for the same-year winter season, and ensures certain edits to published seasons flow through an approved-save path where propagation occurs.
Changes:
- Extend
propagateWinterFeeDateswith an overrideable target winter operating year and add logic to also propagate same-year winter for regular-season edits (with a fallback when the prior winter season is missing). - Adjust season save handling to downgrade published seasons to
APPROVEDwhen operation/winter-fee dates change, enabling winter-fee propagation on edits made from the published state.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| backend/utils/propagateWinterFeeDates.js | Adds optional targeting and additional propagation pass to cover same-year winter recalculation for regular-season edits. |
| backend/routes/api/seasons.js | Modifies status-resolution flow for published edits so date changes can trigger propagation via an approved-save path. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
duncan-oxd
left a comment
There was a problem hiding this comment.
The changes look good, but I just want to clarify the naming to make sure I get it:
A winter season that starts in 2026 and ends in 2027 is operatingYear 2026
So the "current" regular season for that winter season is also operatingYear 2026
2027 would be the "next" and 2025 would be the "previous", all relative to that winter season.
A winter season spans 2 years, so it overlaps with 2 regular seasons
A regular season overlaps with 2 winter seasons? For example, a 2026 regular season. The 2025 winter season ends in early 2026 and the 2026 winter season starts in late 2026 (and continues into 2027). So 3 years are involved with each regular season, but it's only 2 operating years.
Is that all still true? :D Ready to merge, if so!
|
Jira Ticket
CMS-1977
Description
propagateWinterFeeDates.jsso when a regular-season operation date is edited, winter-fee propagation also recalculates the same-year winter season (with a fallback if the prior winter season is missing).seasons.js, the note validation was moved to run after that final status is decided, so validation uses the correct updated status.