feat: add Jira integration as issue tracker provider#588
feat: add Jira integration as issue tracker provider#588acreeger merged 3 commits intoiloom-ai:mainfrom
Conversation
There was a problem hiding this comment.
Added this change because I use the ASDF tool manager.
Adds full Jira Cloud support including: - JiraApiClient for REST API communication - JiraIssueTracker implementing the IssueTracker interface - ADF/Markdown bidirectional conversion for Jira comments - Jira MCP provider for issue management server - Case-sensitive issue key preservation in metadata - Wiki markup prevention in agent templates - moveIssueToReadyForReview workflow transition support Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
d47b468 to
badf7b0
Compare
Extend JiraApiClient with createIssueWithParent, createIssueLink, deleteIssueLink, searchIssues, and DELETE request support. Implement createChildIssue, createDependency, getDependencies, removeDependency, getChildIssues, and getPR on JiraIssueManagementProvider. Add test-jira CLI command for manual testing against a live Jira instance. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
I noticed the
|
Add Jira-only flags for filtering issues by sprint and assignee. --sprint accepts a sprint name or "current" for the active sprint, --mine filters to issues assigned to the authenticated user. Also adds doneStatuses config, Jira provider support in issues command, and jira.ts utility module. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@acreeger This PR is ready to be reviewed/merged. If you see any other places that need integration, let me know. I imagine there are still a few, but we could treat those as bugs later on as they crop up. |
|
This PR is a blocker for #595. It looks like I can't set proper dependencies but I wanted to document this. |
|
@NoahCardoza - Thanks for this substantial contribution! The Jira integration is architecturally sound - you clearly studied the existing GitHub and Linear provider patterns and followed them well. The ADF/Markdown converter is solid with thorough tests, the case-sensitive issue key preservation via metadata is clever, and the sprint/mine flags degrade gracefully for non-Jira providers. Really nice work. I did a deep review across architecture, code quality, test coverage, integration completeness, and UX. Before I start making fixes on this branch, I want to align with you on the findings so you can flag any false positives or things I may have misunderstood. Critical - Must Fix Before Merge
High - Should Fix Before Merge
Medium - Can Be Follow-Up
Next StepsMy plan: once you've reviewed and flagged any false positives, I'll make fixes for the Critical and High items on this branch and request your review. Medium items can be tracked as follow-up issues. |
Review Fixes Applied@NoahCardoza — Applied fixes from the review findings. Here's what landed: Security
Bug Fixes
Robustness
Naming & Docs
Tests
Still TODO
|
Combined Analysis & Plan: Configurable Jira Issue TypesExecutive SummaryThe Jira API client hardcodes Implementation OverviewHigh-Level Execution Phases
Quick Stats
Complete Analysis & Implementation Details (click to expand)Research FindingsProblem Space
Codebase Research
Affected Files
Medium Severity Risks
Implementation PlanAutomated Test Cases to CreateNo new test file needed. The existing test patterns don't unit test Files to Modify1.
|
|
Fun discovery while fixing the ADF table conversion bug: the |
Analysis & Plan: Rewrite checkbox-to-taskList conversion
|
Combined Analysis & Plan - Checkbox-to-taskList RewriteExecutive SummaryThe current checkbox-to-taskList conversion in Implementation OverviewHigh-Level Execution Phases
Quick Stats
Complete Analysis and Implementation Details (click to expand)Research FindingsProblem Space
Codebase Research
Affected Files
Implementation PlanAutomated Test Cases to CreateTest File: Existing tests at lines 704-757 should continue to pass. Add new tests: Click to expand test structure (20 lines)describe('checkbox task list conversion', () => {
// EXISTING tests stay (lines 705-757)
test('checkbox list with bold text converts correctly', () => {
// input: '- [x] **Bold task**\n- [ ] Regular task'
// verify: taskList with 2 taskItems, first DONE, second TODO
// verify: first taskItem text includes bold mark
})
test('checkbox list with inline code converts correctly', () => {
// input: '- [x] Run `pnpm build`\n- [ ] Run `pnpm test`'
// verify: taskList, text content matches, code marks preserved
})
test('multiple separate checkbox blocks convert independently', () => {
// input: '- [x] A\n- [ ] B\n\nSome text\n\n- [ ] C\n- [x] D'
// verify: two separate taskList nodes with correct states
})
test('checkbox block followed by regular list - only checkbox block converts', () => {
// input: '- [x] Done\n- [ ] Todo\n\n- regular item\n- another item'
// verify: first list is taskList, second is bulletList
})
})Files to Modify1.
|
Fix security, correctness, and robustness issues identified during deep review of the Jira integration: - Fix buffer corruption using Buffer.concat instead of string concatenation - Fix inverted removeDependency link direction (outward→inward) - Add JQL escaping to prevent injection in search queries - Add settings parameter to 8 factory call sites that would crash - Replace hardcoded GitHubService in cleanup.ts with factory - Redact sensitive fields (apiToken, etc.) in debug logging - Add HTTP timeout (30s) and pagination caps to API client - Fix error swallowing: catch only specific error codes (401/403/404) - Add Jira status-to-state mapping instead of unsafe cast - Rename 'linear' identifier type to 'project-key' for provider-agnostic naming - Move DEBUGGING_MCP.md to docs/ with ESM import fixes - Add Jira provider option to il init wizard prompt - Update test assertions to match code changes
|
@NoahCardoza — I've applied fixes from the review findings, added configurable issue types, and fixed the ADF conversion for tables and checkbox task lists (with upstream issues filed on Ready for your review when you get a chance. |
Fix security, correctness, and robustness issues identified during deep review of the Jira integration: - Fix buffer corruption using Buffer.concat instead of string concatenation - Fix inverted removeDependency link direction (outward→inward) - Add JQL escaping to prevent injection in search queries - Add settings parameter to 8 factory call sites that would crash - Replace hardcoded GitHubService in cleanup.ts with factory - Redact sensitive fields (apiToken, etc.) in debug logging - Add HTTP timeout (30s) and pagination caps to API client - Fix error swallowing: catch only specific error codes (401/403/404) - Add Jira status-to-state mapping instead of unsafe cast - Rename 'linear' identifier type to 'project-key' for provider-agnostic naming - Move DEBUGGING_MCP.md to docs/ with ESM import fixes - Add Jira provider option to il init wizard prompt - Update test assertions to match code changes
|
@NoahCardoza , I think we're ready to roll - I'm going to merge this! |
|
@acreeger Nice find with the table formatting. I knew there was an issue there because it would intermittently fail. I hadn't got around to debugging but I'm glad that's been resolved! Lots of good finds in that review. I'm glad you didn't let me merge without pagination, that would have produced some head scratchers later down the road for sure. I'll work on rebasing the bitbucket branch now! 🚀 |
Summary
PROJ-123) in metadata for correct Jira API callsmoveIssueToReadyForReviewworkflow transition support across all providersNote: BitBucket integration (PR #TBD) depends on this branch and will be opened separately once this is merged.
Test plan
il start PROJ-123creates a loompnpm vitest run src/lib/providers/jira/AdfMarkdownConverter.test.tspnpm vitest run src/lib/MetadataManager.test.tsil finishmoves Jira issue to "Ready for Review" statepnpm build— compiles successfully🤖 Generated with Claude Code