Repository navigation
Backport #36397 to 2.0: offer only workflow-allowed transitions in the incident status menu - #36538
Conversation
…nt status menu Backport of the status-menu part of #36397 to 2.0. An Assigned incident's menu offered New and Ack, which TestCaseResolutionTaskWorkflow has no edge for, so picking either failed with "Transition 'new' is not available for task". The menu now offers only reassign and resolve from Assigned.
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
Code Review ✅ Approved🟡 Medium risk · Restricting assigned-incident status options to reassign or resolve could hide a valid transition if the menu mapping diverges from workflow rules. Restricts the inline incident status menu to workflow-allowed transitions, so an assigned incident only offers Assigned (reassign) and Resolved instead of New or Ack, which the API rejects. No issues found. VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|



Backport of the status-menu part of #36397 to
2.0.Fixes #34616.
What
TestCaseResolutionTaskWorkflowlets anAssignedincident only be reassigned or resolved:AssignedStagehas noneworackedge. On2.0the inline incident status menu (Incident column in the test case list, Incident Manager) still offers every status, whatever the current one is. If a user picks New or Ack on an assigned incident, the API rejects it, and the user sees the raw error:A customer on 2.0.7 reported this. The menu now offers only the statuses the workflow allows from the incident's current status. For
Assignedthat is Assigned (reassign) and Resolved. New, Ack and Resolved incidents keep the full list (a resolved incident is reopened, not transitioned).Backport notes
Taken from 53671c0. Only the status-menu hunks were applied. The rest of that commit (grouped-incident sort in the URL, plural translations, severity labels, bulk status changes) targets features that are not on
2.0.TestSuite.constant.ts: addsINCIDENT_STATUS_MENU_OPTIONS. Applied cleanly.InlineTestCaseIncidentStatus.component.tsx: the menu maps overINCIDENT_STATUS_MENU_OPTIONS[statusType]and no longer over every enum value. Applied cleanly.IncidentStatusPopoverHeader.component.tsx: addsdata-testid="incident-status-popover-back", which the new test uses. It conflicted on the icon (ArrowBackIconon2.0,ArrowLeftonmain). Kept2.0's icon and added only the test id.TestCaseStatusModal.component.tsx: not changed. On2.0it already limits an assigned incident to Assigned and Resolved inline.mainonly moved that onto the shared map.Type of change
Tests
jest src/components/DataQuality/IncidentManager/TestCaseStatus src/components/DataQuality/TestCaseStatusModal: 3 suites passed, 48 tests passed (2 skipped are pre-existing).status menu of an assigned incident offers only reassign and resolveinInlineTestCaseIncidentStatus.test.tsx. It fails when the component is reverted toObject.values(TestCaseResolutionStatusTypes)and passes with the fix.2.0's ownnode_modules.tsc --noEmitreports no errors in the changed files. Other errors exist in this local checkout because the connection-schema JSONs were not generated.2.0.UI screen recording
Not applicable. This is a standalone bug fix, not a feature.
Checklist
REVIEW.mddoes not exist on2.0, so the review used the bar frommain. No 🔴 findings.statusTypecomes from the requiredtestCaseResolutionStatusType, and theRecord<TestCaseResolutionStatusTypes, …>type makes every status need an entry.mainalready carries it.🤖 Generated with Claude Code