Skip to content

feat(pm-wizard): map custom workflow statuses in Trello and JIRA wizards#1376

Merged
aaight merged 1 commit into
devfrom
feature/MNG-1064-trello-jira-custom-status-mapping
May 18, 2026
Merged

feat(pm-wizard): map custom workflow statuses in Trello and JIRA wizards#1376
aaight merged 1 commit into
devfrom
feature/MNG-1064-trello-jira-custom-status-mapping

Conversation

@aaight
Copy link
Copy Markdown
Collaborator

@aaight aaight commented May 18, 2026

Summary

Brings Trello and JIRA provider wizards to parity with Linear by mapping custom workflow statuses (e.g. prd) in the Status Mapping step and saving missing pm:status-changed trigger configs for their dispatch agents.

Closes MNG-1064.

Changes

  • Trello wizard (web/src/components/projects/pm-providers/trello/wizard.ts):
    • Load trpc.workflowStatuses.list.queryOptions() in useProviderHooks and expose workflowStatuses on the provider hooks contract.
    • TrelloStatusMappingAdapter renders workflowStatuses when present and falls back to TRELLO_LIST_SLOTS when unavailable.
    • buildSaveTriggerConfigs now uses buildMissingStatusTriggerConfigs so mapped custom statuses with dispatch agents get missing trigger configs without overwriting existing ones.
  • JIRA wizard (web/src/components/projects/pm-providers/jira/wizard.ts): same wiring as Trello — query, hooks contract field, adapter dynamic source, and shared save helper.
  • Tests (tests/unit/web/pm-wizard-hooks.test.ts): added eight provider-specific buildSaveTriggerConfigs cases for Trello and JIRA, including a mapped custom status (prd), no-overwrite of existing configs, built-in defaults preservation, and statuses with no agentType producing no configs.

Why

Linear's wizard already loads workflow status definitions and maps them dynamically; Trello and JIRA were stuck on static slot constants. With CASCADE supporting custom workflow statuses (e.g. prd) globally, operators set up on Trello/JIRA had no way to wire those into the status-mapping step or persist a corresponding pm:status-changed trigger config at save time. This change closes the parity gap.

Static slot constants (TRELLO_LIST_SLOTS, JIRA_STATUS_SLOTS) are retained as fallback data — the existing alerts and friction slot regression tests continue to pass unchanged.

Test Plan

  • npx vitest run --project unit-core tests/unit/web/pm-wizard-hooks.test.ts — 45 tests pass (8 new)
  • npx vitest run --project unit-core tests/unit/web/wizard-alerts-slot.test.ts tests/unit/web/wizard-friction-slot.test.ts — alerts/friction fallback tests still green
  • npx vitest run --project unit-core tests/unit/web/ — all 549 web tests pass
  • npx vitest run --project unit-core — 5680 unit-core tests pass
  • npx vitest run --project unit-api — 1655 unit-api tests pass
  • npx vitest run --project unit-triggers --project unit-backends — 2346 tests pass
  • npm run typecheck — clean
  • npm run lint for changed files — clean

Out of scope

  • Backend lifecycle movement behavior for custom status keys.
  • JIRA or Trello webhook dispatch changes.
  • Database schema or migration changes.

🤖 Generated with Claude Code

🕵️ claude-code · claude-opus-4-7 · run details

Copy link
Copy Markdown
Collaborator

@nhopeatall nhopeatall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - the Trello and JIRA wizard changes match the existing Linear workflow-status pattern, use the shared missing-trigger helper correctly, and the focused pm-wizard-hooks test file passes locally (45 tests).

🕵️ codex · gpt-5.5 · run details

@aaight aaight merged commit 9a99537 into dev May 18, 2026
9 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.

2 participants