Archive all issues matching a JQL query using jirac. Archive is destructive — issues are hidden from regular search and become read-only.
Steps:
- Check that
jiracis available by runningjirac --version. If missing, tell the user to install it (cargo install jira-commands). - Extract or build a JQL query from the user's request that scopes the archive cleanly (project, status, age, resolution).
- Dry-run the JQL via
jirac issue list --jql '<JQL>'so the user can see the affected set before archiving. - Confirm intent explicitly — archive is irreversible without admin assistance.
- Run
jirac issue archive --jql '<JQL>'(omit--forceto keep the confirmation prompt; add--forceonly after explicit confirmation in agent flows). - Report how many issues were archived.
Notes:
- Archive requires sufficient Jira permissions (typically Project Administrator).
- Archived issues remain in the database but are hidden from boards, dashboards, and standard JQL searches by default.
- Prefer scoping by
project,resolution,updated, andstatus— broad queries can archive far more than expected. - For non-destructive cleanup, consider
bulk-transitionto a "Won't Do" or "Closed" status first.
Examples:
- "archive done issues older than 6 months in PROJ" →
jirac issue archive --jql 'project = PROJ AND resolution = Done AND updated < -180d' - "archive all 'Won't Do' items in PROJ older than 90 days" →
jirac issue archive --jql 'project = PROJ AND status = "Won''t Do" AND updated < -90d' - "archive released old work" →
jirac issue archive --jql 'project = PROJ AND fixVersion in releasedVersions() AND updated < -365d'