Conversation
What was broken Changing an active development challenge from Scheduled to Immediately could save successfully but still show the active-phase shortening warning. Root cause (if identifiable) Work compared submitted and persisted absolute phase end timestamps. The phase scheduler can open an immediate phase a few seconds later and shift its dates while preserving its duration, which the UI misclassified as rejected shortening. What was changed Compare canonical submitted and persisted phase durations before showing the partial-save warning. Fall back to end-date comparison only when duration data is unavailable and phase starts are unchanged, and document the updated verification behavior. Any added/updated tests Added a save-flow regression for a scheduler-shifted immediate phase with unchanged duration and corrected the existing genuine-shortening fixture to use consistent durations.
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.
What was broken
Changing an active development challenge from Scheduled to Immediately could save the immediate schedule but still show “Active phase shortening cannot be saved. Other challenge changes were saved.”
Root cause (if identifiable)
The earlier challenge-api fixes correctly validated recalculated phase durations, and platform-ui PR #2019 preserved partial-minute API durations. The remaining Work post-save check still compared absolute phase end timestamps. When the scheduler opened an immediate phase a few seconds after the submitted start and shifted its dates without changing its duration, Work treated the later persisted end as rejected shortening.
What was changed
The post-save check now compares canonical submitted and persisted phase durations. It falls back to comparing end dates only when duration data is unavailable and the phase start did not move, preserving the genuine shortening warning without flagging scheduler timing shifts. The challenge editor documentation now describes this behavior.
Any added/updated tests
Added a ChallengeEditorForm save-flow regression using the timestamps and unchanged 48-hour duration seen in QA. Updated the existing PM-5446 true-shortening fixture to use consistent 8-day and 7-day durations so the rejection warning remains covered.
Validation
yarn lintpasses.yarn run buildpasses with existing repository CSS-order and lint-style warnings.yarn test:no-watchwas run. The full baseline remains blocked by 10 unrelated failing suites (27 tests), including the existing PaymentFormModalgetAssignmentPaymentCyclemock failure and ChallengeEditorForm launch tests that stop at budget-approval gating.