Skip to content

feat(import): add ticket import from Jira and GitHub Issues (PUNT-34)#408

Open
jmynes wants to merge 4 commits into
mainfrom
feat/punt-34-import-jira-github-issues
Open

feat(import): add ticket import from Jira and GitHub Issues (PUNT-34)#408
jmynes wants to merge 4 commits into
mainfrom
feat/punt-34-import-jira-github-issues

Conversation

@jmynes

@jmynes jmynes commented Mar 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add Jira JSON/CSV and GitHub Issues JSON import parsers with auto-format detection
  • Add API route POST /api/projects/[projectId]/import for batch ticket creation with label auto-creation
  • Add Import tab in Project Settings with drag-and-drop file upload, ticket preview with select/deselect, and column targeting

Details

Parsers (src/lib/import/):

  • Jira: Maps summary, description (including ADF), type (Story/Bug/Task/Epic/Sub-task), priority (Blocker->critical, etc.), status, resolution, labels, components, story points from both JSON and CSV formats
  • GitHub: Maps title, body, state, labels; infers type/priority from well-known label names (e.g., "bug" label -> bug type, "p0" -> critical); excludes pull requests automatically
  • Auto-detect: Heuristic detection based on JSON structure (key/fields -> Jira, state/number -> GitHub)

API (src/app/api/projects/[projectId]/import/route.ts):

  • Atomic batch import in a single transaction
  • Sequential ticket numbering from project max+1
  • Creates missing labels with default colors
  • Sprint history tracking for sprint-assigned imports
  • SSE event emission for real-time sync

UI (src/components/projects/settings/import-tab.tsx):

  • Drag-and-drop or click-to-browse file upload
  • Preview stage with per-ticket select/deselect, type/priority badges, story points, label counts
  • Target column selector
  • Toggle for auto-creating missing labels
  • Import progress and completion summary with warnings

Test plan

  • Upload a Jira JSON export and verify tickets are parsed with correct field mapping
  • Upload a Jira CSV export and verify the same
  • Upload a GitHub Issues JSON (from gh issue list --json number,title,body,labels,state) and verify parsing
  • Verify auto-detection picks the correct parser
  • Deselect some tickets in preview, import, and verify only selected ones are created
  • Verify labels are auto-created when toggle is on
  • Verify imported tickets appear in the target column with correct numbering
  • Verify the Import tab appears in Project Settings for users with settings permission

Generated with Claude Code

jmynes and others added 3 commits March 6, 2026 20:55
Add a complete import system for ingesting tickets from external sources:

- Jira JSON/CSV parser with field mapping (type, priority, status,
  resolution, labels, components, story points, ADF description)
- GitHub Issues JSON parser with label-based type/priority inference
  and automatic PR exclusion
- Auto-detection of source format from JSON structure
- API route at /api/projects/[projectId]/import with atomic batch
  creation, label auto-creation, and sprint history tracking
- Import UI tab in project settings with drag-and-drop file upload,
  ticket preview with select/deselect, column targeting, and
  progress/completion feedback

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jmynes jmynes self-assigned this Mar 8, 2026
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