Files
forge/claude_artifacts/engineer-20260827-185932.md
T
Dmytro Tkachenko 28d817ebe9 Init
2026-08-29 11:59:28 +03:00

1.6 KiB

engineer — Extension Jira sync (SNOW + Jira, per ADR)

Date: 2026-08-27 · Implements architect-20260827-180544. v2.2.0.

Built

  • Server server/db.ts attachJira(items) — attach-only: UPDATE tickets SET jira = COALESCE(jira,'{}') || $2::jsonb, jira_key = COALESCE($3, jira_key) WHERE number=$1. Never touches status/state/assignee/activity. index.ts POST /api/sync/jira (token-authed, rate-limited) → validates {items:[{number,jira,jiraKey}]} → attachJira.
  • Extension background.js: collectFromJira(cfg) pulls /rest/agile/1.0/board/{id}/issue (paged), auth = Basic(email+token) or Bearer PAT; resolves RITM via customfield_26001 / RITM\d+; builds {number, jira:{key,status,statusChangedAt,assignee,url:baseUrl/browse/KEY}}; POSTs to /api/sync/jira. Wired into runSync AFTER SNOW; Jira is best-effort (never fails SNOW). options.html/js: Jira base URL, email, API token/PAT, board id(s); requests host perm for the Jira origin.

Verified (live, remote DB)

  • POST /api/sync/jira for RITM2653436 → matched:1; AFTER: status/state/assigned_to UNCHANGED, jira_key=WFN-605, jira.status In QA, custom url support.dataart.com/browse/WFN-605. no-token → 401.
  • server tsc clean; extension node --check OK; 9/9 tests. DB restored via reseed.

Not yet (follow-ups)

  • Jira changelog fetch → statusDurations/movements (chart #17/#19). v1 does status/key/assignee/url.
  • Live Jira REST untested (needs a real instance + creds); logic follows the ADR.

Next: done (v1). Configure the extension options with the Jira board id + token to use it.