How to mass delete issues in Jira
Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.
Summary
Jira cloud natively does not offer a SQL query to delete old issues directly from the database. This is the kind of action that could potentially corrupt your data.
We are assuming that you are looking for permanently removing issues from Jira which is no longer required. Please be aware to take a backup of your issues before performing the below operations.
Environment
Jira Cloud
Cause
The reason for mass deleting issue in Jira could vary from improving the performance of the instance to decreasing the number of issues on the instance, or simply getting rid of obsolete issues which is no longer required.
Solution
The solutions below would be some ways to purge a large amount of issues from Jira.
1. Through Jira UI - This has a 1000 issue limit on the number of issues that can be modified in bulk
This bulk operation allows you to delete multiple issues at the same time. To delete multiple issues:
- Perform a search with the required filters to produce a list of issues.
- Select ... to the right of the screen > Select Bulk Change all 1000 issues
- Select the issues you'd like to perform the bulk operation on, and select Next.
- Choose operation > Select Delete Issues and then select Next.
- If available, decide whether you'd like to send email notifications. Select Next.
- Review your bulk operation, and select Confirm when you are happy with the operation.
2. Using REST API
You can build a script that will run the REST API that is mentioned in the Developer API page to delete multiple issues all at once. Sample of a curl request with the API https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey as below.
curl --request DELETE \
--url 'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}' \
--user 'email@example.com:<api_token>'
3. Third party Plugin
Mass Delete for Jira makes the removal of large numbers of Jira issues easy. Unlike the bulk delete functionality provided by Jira, this add-on has no limit on the number of issues removed by one job.