Ho to quickly delete 40-50k issues from JIRA

We are adding around 2k issues per day. We don't need to archive them after they are completed. At the moment we can delete them only using bulk but this action allows to remove only 1k issues. Is there any chance to remove all of them at once?

Now we are wasting time by manually deleting issues.  

Appreciate your help in this request.  

1 answer

0 votes
Josh Steckler Community Champion Apr 12, 2017

Hi Robert,

I found this, which may help on server but not for cloud. https://community.atlassian.com/t5/JIRA-questions/How-do-you-increase-the-bulk-change-maximum/qaq-p/417702

But if it were me, I would automate. I would write a script using the REST API that would run daily, deleting issues after a certain amount of time after closure.

With ScriptRunner you can configure Escalation Service that can run periodically and remove all the issues found by defined JQL query - see the screenshot of example configuration:

jira_periodic_bulk_delete.pngAbove example will run every 60 minutes and delete all the issues found by following query:

project = "Jira" AND Status in (Closed, Resolved)

Here is the script that performs delete using "silent" deleteIssueNoEvent method which is perfect for automated bulk deletes:

import com.atlassian.jira.component.ComponentAccessor
def issueManager = ComponentAccessor.getIssueManager();
issueManager.deleteIssueNoEvent(issue);

I tested above approach myself and it works.

It works, the issue(s) get deleted, but atlassian-jira.log contains 2-lines of ERROR message for each issue deleted. (Jira 7.5.1) (ScriptRunner 5.2.1)

 

2017-11-08 01:07:01,166 Caesium-1-4 ERROR admin     [c.o.s.c.jira.utils.WorkflowUtils] Errors: {}
    Error Messages: [You can not update a null issue.]
2017-11-08 01:07:01,169 Caesium-1-4 ERROR admin     [c.o.s.c.jira.utils.WorkflowUtils] Not attmpting transition

 

Null Issue, I guess because it deleted and nothing to transition.

 

Any ideas to suppress the messages?

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,739 views 11 18
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot