Skip to content

jira: auto-detect boards & epics when configuring an app's JIRA integration#2239

Merged
atomantic merged 2 commits into
mainfrom
jira-workspace-detector
Jul 6, 2026
Merged

jira: auto-detect boards & epics when configuring an app's JIRA integration#2239
atomantic merged 2 commits into
mainfrom
jira-workspace-detector

Conversation

@atomantic

Copy link
Copy Markdown
Owner

What

Configuring an app's JIRA integration used to require hand-typing a Board ID (a free-text field) — exactly how a board id silently goes stale (e.g. after a Server→Cloud migration, where board ids are reassigned). The app-config JIRA tab now auto-detects the workspace from the chosen instance + project:

  • Board is a detected dropdown (id — name (type)) instead of free text. If the app's saved board id isn't among the project's live boards, it's flagged with an amber "pick a current one" warning (the stale value stays selectable so it isn't silently dropped). Falls back to manual entry if detection fails.
  • The selected board shows its current active sprint as confirmation.
  • Epic Key gained live search-by-name (type a name → pick from matching epics) and validation of a typed/pasted key — ✓ resolves as Epic / ⚠ wrong type / ⚠ no longer resolves.

How

  • Backend (server/services/jira.js + routes/jira.js), mirroring the existing getProjects/searchEpics pattern:
    • GET /jira/instances/:id/projects/:key/boardsgetBoards() (paginated Agile board list)
    • GET /jira/instances/:id/issues/:keygetIssue() (resolve a key for epic validation)
  • Client: apiSystem.js wrappers (getJiraBoards, getJiraBoardSprints, searchJiraEpics, getJiraIssue) + EditAppDrawer.jsx UI. Board-reset on instance/project change is centralized in changeInstance/selectProject handlers so no call site forgets it (deliberately interaction-driven, not a projectKey effect that would wipe the saved board on mount before staleness detection runs). Epic field discriminates validate-vs-search via a key regex so only one request fires.

Review & tests

  • /simplify pass (reuse/simplification/efficiency/altitude): applied the board-reset consolidation; skipped an EntityCombobox swap (its client-side filter + create-new + single-mode don't fit the epic field's server-search + dual key/name mode + validation footer).
  • claude review pass: no high/medium defects; applied its one actionable finding (trim epicKey on save so it matches the validation).
  • Tests: server jira.test.js 14/14, client EditAppDrawer.test.jsx 8/8; client lint clean.

atomantic added 2 commits July 6, 2026 10:01
…ration

Configuring an app's JIRA settings now detects the project's boards (dropdown
with a stale-board warning) instead of a hand-typed Board ID, shows the selected
board's active sprint, and adds epic search-by-name plus key validation. New
read-only endpoints: GET .../projects/:key/boards and GET .../issues/:key.
@atomantic atomantic merged commit 3d31686 into main Jul 6, 2026
2 checks passed
@atomantic atomantic deleted the jira-workspace-detector branch July 6, 2026 17:16
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