Skip to content

Backport #36397 to 2.0: offer only workflow-allowed transitions in the incident status menu - #36538

Merged
ShaileshParmar11 merged 1 commit into
2.0from
backport-36397-incident-status-menu-2.0
Oct 29, 2026
Merged

ShaileshParmar11 merged 1 commit into
2.0from
backport-36397-incident-status-menu-2.0

Conversation

@ShaileshParmar11

Copy link
Copy Markdown
Contributor

Backport of the status-menu part of #36397 to 2.0.

Fixes #34616.

What

TestCaseResolutionTaskWorkflow lets an Assigned incident only be reassigned or resolved: AssignedStage has no new or ack edge. On 2.0 the 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:

Transition 'new' is not available for task ''.

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 Assigned that 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: adds INCIDENT_STATUS_MENU_OPTIONS. Applied cleanly.
  • InlineTestCaseIncidentStatus.component.tsx: the menu maps over INCIDENT_STATUS_MENU_OPTIONS[statusType] and no longer over every enum value. Applied cleanly.
  • IncidentStatusPopoverHeader.component.tsx: adds data-testid="incident-status-popover-back", which the new test uses. It conflicted on the icon (ArrowBackIcon on 2.0, ArrowLeft on main). Kept 2.0's icon and added only the test id.
  • TestCaseStatusModal.component.tsx: not changed. On 2.0 it already limits an assigned incident to Assigned and Resolved inline. main only moved that onto the shared map.

Type of change

  • Bug fix

Tests

  • Unit (Jest): jest src/components/DataQuality/IncidentManager/TestCaseStatus src/components/DataQuality/TestCaseStatusModal: 3 suites passed, 48 tests passed (2 skipped are pre-existing).
  • New regression test: status menu of an assigned incident offers only reassign and resolve in InlineTestCaseIncidentStatus.test.tsx. It fails when the component is reverted to Object.values(TestCaseResolutionStatusTypes) and passes with the fix.
  • Lint: ESLint and Prettier are clean on the 4 changed files, run with 2.0's own node_modules.
  • Type check: tsc --noEmit reports no errors in the changed files. Other errors exist in this local checkout because the connection-schema JSONs were not generated.
  • Backend / ingestion integration tests: Not applicable. UI-only change.
  • Playwright: Not run. The Playwright test added in Fixes 34616: Grouped incidents release-testing fixes (sort in URL, status menu, translations) #36397 covers the grouped-incidents page, which is not on 2.0.
  • Manual: Not run against a live 2.0 stack.

UI screen recording

Not applicable. This is a standalone bug fix, not a feature.

Checklist

  • Self-reviewed the diff at 09586c5. REVIEW.md does not exist on 2.0, so the review used the bar from main. No 🔴 findings. statusType comes from the required testCaseResolutionStatusType, and the Record<TestCaseResolutionStatusTypes, …> type makes every status need an entry.
  • Added a test that fails without the fix
  • No decision record needed. The rule (menu follows the workflow's edges) is documented in the constant's comment, and main already carries it.

🤖 Generated with Claude Code

…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.
@ShaileshParmar11 ShaileshParmar11 added the UI UI specific issues label Oct 29, 2026
@ShaileshParmar11
ShaileshParmar11 requested a review from a team as a code owner October 29, 2026 10:13
@ShaileshParmar11
ShaileshParmar11 requested review from Rohit0301 and removed request for a team October 29, 2026 10:13
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

@github-actions github-actions Bot added the safe to test Add this label to run secure Github workflows on PRs label Oct 29, 2026
@gitar-bot

gitar-bot Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
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.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@github-actions

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 68%
68.42% (83184/121577) 53.37% (51612/96706) 54.07% (15340/28366)

@sonarqubecloud

Copy link
Copy Markdown

@ShaileshParmar11
ShaileshParmar11 merged commit 5da844d into 2.0 Oct 29, 2026
99 of 104 checks passed
@ShaileshParmar11
ShaileshParmar11 deleted the backport-36397-incident-status-menu-2.0 branch October 29, 2026 11:46

This branch had an error being deployed

1 failed deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants