Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

I need to bulk delete issues in Jira

Hello,

I need a way to bulk delete a certain type of issue in Jira. I've found a way to buld delete up to 1000 messages at a time but there are WAY too many screens to go through each time and I can't spend all day on this. Is is possible to do a query and delete every result? I have 53,000 issues I need out of my jira database.

Please help.

Thanks

5 answers

Hi, have you tried doing bulk delete https://confluence.atlassian.com/display/JIRA/Modifying+Multiple+('Bulk')+Issues?

You can perform a search on the issues you want and using the bulk operation to delete all the issues. Does this work for you?

Otherwise you might like to look at JIRA CLI https://bobswift.atlassian.net/wiki/display/JCLI/JIRA+Command+Line+Interface - Bob would probably provide more help with this.

I tried the bulk edit function but it only lets you do 1000 at a time and I have 53000 to delete. Furthermore it doesn't work. Ever time I hit the confirm button it hangs for several seconds then I get a message that Jira is down for maintenance. I'm hoping somebody at Atlassin can help me out or I guess I'll have to figure out the command line interface.

Thanks

Expanding on Harry's answer - runFromIssueList with the JQL to select the right issues and then deleteIssue as the action that is run for each issue found in your query - see How to use runFromIssueList

Like Vuyani Moyo likes this

Delete multiple issues

This bulk operation allows you to delete multiple issues at the same time.

Collapse

  1. Perform a search with the required filters to produce a list of issues.
  2. Select Tools > Bulk Change.
  3. Select the issues you'd like to perform the bulk operation on, and select Next.
  4. Select Delete Issues, and select Next.
  5. If available, decide whether you'd like to send email notifications. Select Next.
  6. Review your bulk operation, and select Confirm when you are happy with the operation.
Like Vuyani Moyo likes this

There's an easy answer if you want to delete a sequential series of issues, eg. issues ABC-1 to ABC-5000.

First, you can use `curl` (in Mac OS terminal or Linux or similar) with the API to delete individual issues by key:

curl -u yourname:yourPassw0rd -X "DELETE" http://jira.example.com/rest/api/2/issue/ABC-1

The API URL alone will give you the issue when used with 'GET' but adding `-X "DELETE"` will change the request method from GET to DELETE and the server will delete the issue.

For deleting many issues, `curl` has a built-in option that lets you specify a range of numbers so you can do something like this:

curl -u yourname:yourPassw0rd -X "DELETE" http://jira.example.com/rest/api/2/issue/ABC-[1-5000]

... and then just let that run for a while.

If you need to delete issues at random, first you'll need to get a list of issue numbers, then write a script to run the one-issue command once for each issue.

This is really handy when you're testing options to bulk-import issues and you need to delete a few thousand things you just created. :-)

(I assume James solved his problem in the last 5 years but maybe someone else will find this useful. )

Note that this will result in one notification being sent for each deleted issue. You might want to go to the project's Notification Settings page and temporarily remove everyone from the "Issue Deleted" event.

I suggest searching the Jira marketplace for a "delete" add-on/plug-in/app.

For v8 I've just used Mass Delete for JIRA. It is currently chewing through the tens of thousands of issues I need deleted. It was very simple to use, basing it's deletion off a JQL query.

It did generate a lot of email spam. Next time I will do this out of hours with notifications disabled while it deletes.

Depending on when you read this the app may have a replacement or competitor. 

Hello,

You can also use jira-python that you install with `pip install jira`

http://jira.readthedocs.io

Then I wrote such a super simple script:

#!/usr/bin/python
# This script shows how to use the client in anonymous mode
# against jira.atlassian.com.
from jira import JIRA
import re

jira = JIRA(basic_auth=('admin', 'admin'),server=('http://jira.domain.net:8080'))

issues = issues = jira.search_issues('reporter="Default"')
for issue in issues:
  print "%s" % issue
  issue.delete()

Of course you can search issues with different fields (status, priority etc.)

Hello,

I used this add on <

Mass Delete for Jira in Jira cloud. It saved me. They have a server version too 

It is very simple to use. 

https://marketplace.atlassian.com/apps/1215042/mass-delete-for-jira?hosting=cloud&tab=overview

I forgot to mention. Please make sure to Disable Delete Issue Notification from the Project Notification setting. I deleted 50,000 issues in 5 hours. 

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you