2.7 KiB
2.7 KiB
name, description
| name | description |
|---|---|
| specweave-jira:import-projects | Import additional JIRA projects post-init with smart filtering, resume, and dry-run support |
JIRA Project Import Command
Import additional JIRA projects after initial setup with advanced filtering and merge capabilities.
Usage
# Import all active projects
/specweave-jira:import-projects --filter active
# Import with preset filter
/specweave-jira:import-projects --preset production
# Import with custom JQL
/specweave-jira:import-projects --jql "project NOT IN (TEST, SANDBOX)"
# Dry-run preview (no changes)
/specweave-jira:import-projects --dry-run
# Resume interrupted import
/specweave-jira:import-projects --resume
Options
--filter <type>- Filter by status (active, archived, all)--type <types>- Filter by project type (software, business, service_desk)--lead <email>- Filter by project lead--jql <query>- Custom JQL filter--preset <name>- Use saved filter preset--dry-run- Preview without making changes--resume- Resume interrupted import--no-progress- Disable progress tracking
Examples
Import Active Projects Only
/specweave-jira:import-projects --filter active
Filters out archived projects, shows preview, prompts for confirmation, merges with existing.
Import with Production Preset
/specweave-jira:import-projects --preset production
Uses the "production" preset filter (active + software + excludes TEST/SANDBOX).
Custom JQL Filter
/specweave-jira:import-projects --jql "lead = currentUser() AND status != Archived"
Imports projects where you are the lead and not archived.
Dry-Run Preview
/specweave-jira:import-projects --filter active --dry-run
Shows which projects would be imported without making any changes.
Features
- Smart Filtering: Filter by status, type, lead, or custom JQL
- Merge with Existing: Automatically merges with existing projects (no duplicates)
- Progress Tracking: Real-time progress with ETA and cancelation support
- Resume Support: Resume interrupted imports with
--resume - Dry-Run Mode: Preview changes before applying
- Filter Presets: Use saved filter combinations
Implementation
This command:
- Reads existing projects from
.env(JIRA_PROJECTS) - Fetches available projects from JIRA API
- Applies selected filters using FilterProcessor
- Shows preview with project count and reduction percentage
- Prompts for confirmation
- Batch imports with AsyncProjectLoader (50-project limit)
- Shows progress with ETA
- Merges with existing projects (no duplicates)
- Updates
.envfile atomically
Handles Ctrl+C gracefully with import state saving for resume.