Skip to content

PM-5378: Allow Design active phase shortening in API#123

Merged
jmgasper merged 2 commits into
developfrom
PM-5378
Jun 17, 2026
Merged

PM-5378: Allow Design active phase shortening in API#123
jmgasper merged 2 commits into
developfrom
PM-5378

Conversation

@jmgasper

Copy link
Copy Markdown
Contributor

What was broken
Active phase end dates could only move later. The API rejected shortening even for Design challenges, and direct phase updates only recalculated successor schedules when an end date was extended.

Root cause
The phase validation did not account for challenge track, and successor recalculation used an extended-only check.

What was changed
Added track-aware active phase end-date validation that allows Design track shortening while blocking end dates before the current date/time. Wired it into challenge updates and direct phase updates, and recalculated dependent phases whenever the active end date changes.

Any added/updated tests
Added phase-helper coverage for Design shortening, non-Design rejection, and past end-date rejection. Added a ChallengePhaseService regression test for Design shortening and successor schedule recalculation.

What was broken
Active phase end dates could only move later. The API rejected shortening even for Design challenges, and direct phase updates only recalculated successor schedules when an end date was extended.

Root cause
The phase validation did not account for challenge track, and successor recalculation used an extended-only check.

What was changed
Added track-aware active phase end-date validation that allows Design track shortening while blocking end dates before the current date/time. Wired it into challenge updates and direct phase updates, and recalculated dependent phases whenever the active end date changes.

Any added/updated tests
Added phase-helper coverage for Design shortening, non-Design rejection, and past end-date rejection. Added a ChallengePhaseService regression test for Design shortening and successor schedule recalculation.
@jmgasper jmgasper marked this pull request as ready for review June 17, 2026 02:57
@jmgasper jmgasper merged commit 894be22 into develop Jun 17, 2026
5 checks passed
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.

1 participant