Skip to content

PM-5447: Avoid false immediate schedule warning#2049

Merged
jmgasper merged 1 commit into
devfrom
PM-5447-1
Jul 23, 2026
Merged

PM-5447: Avoid false immediate schedule warning#2049
jmgasper merged 1 commit into
devfrom
PM-5447-1

Conversation

@jmgasper

Copy link
Copy Markdown
Collaborator

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

  • Focused PM-5447 and PM-5446 regressions pass: 2 tests.
  • yarn lint passes.
  • yarn run build passes with existing repository CSS-order and lint-style warnings.
  • yarn test:no-watch was run. The full baseline remains blocked by 10 unrelated failing suites (27 tests), including the existing PaymentFormModal getAssignmentPaymentCycle mock failure and ChallengeEditorForm launch tests that stop at budget-approval gating.

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.
@jmgasper
jmgasper requested a review from kkartunov as a code owner July 23, 2026 01:31
@jmgasper
jmgasper merged commit ebbf0f7 into dev Jul 23, 2026
7 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