JIRA Automated old issue deletion

Paul DeSousa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 28, 2014

Hi,

Is there a way in JIRA to administer a records retention policy? For example, all issues that are closed and are older than 6 month should be automatically deleted from the system.

2 answers

1 accepted

2 votes
Answer accepted
Matheus Fernandes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 4, 2014

Robert,

An easier way to do this would be to use the JIRA Automation Plugin. You can create the filter as Tiago mentioned, and the Automation tool will run it and delete the issues when you want. :)

Cheers,
Matheus

Paul DeSousa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 4, 2014

OK thanks! I am going to dive into Jelly developement. I am not sure how XML will be a powerful enough language to be able to do the kind of analysis I need, but I will try. In my head I would need to run a JQL filter to find whatever issues that we dinfe as "old", store that list somehow and then run some further filters on them to ensure that we would want to delete them, then after that run a delete on a subset of the original "old" list, and send a report to myself to let me know of what issues were deleted so that if a user complains that their issue has dissappeared I have a record.

It still surprises me that there isn't a default setting to remove old issues built-in, as I would assume most companies would not want to hold on to old issues forever for space/legal/other reasons.

Matheus Fernandes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 4, 2014

Robert,

I'm not sure if I quite understood your comment. With the Automation Plugin you should simply need to create the JQL query (something like "Created <= startofMonth(-6) AND resolution IS NOT EMPTY " for issues older than 6 months), and the automation would take care of the rest.

There shouldn't be any need to create custom scripts or develop anything.

Paul DeSousa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 4, 2014

Oh wow, I will look into that for sure. Of course I am hoping that there are no more requirements than closed date + 6 months, but I hope I can cover it all with JQL Queries. Thanks!

Matheus Fernandes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 4, 2014

Let us know if we can help! :)

Midori
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 2, 2014

We are also big fans of the JIRA Automation Plugin. To make your process safer, you may want to archive the issues to be deleted into a PDF document (with comments, attachments, etc.) using https://marketplace.atlassian.com/plugins/com.midori.jira.plugin.pdfautomation It integrates nicely with the Automation Plugin, so you can chain actions like "run the JQL, then save the resulted issues to a PDF document and finally delete those issues".

1 vote
Tiago Comasseto
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 28, 2014

Hi Robert, I think you can use a Jelly script to do this. We don't have a Jelly tag to delete issues, but here in this other question you can see an example of code to delete an issue. You may to tweak a little the code to fit your requirements.

I hope it helps.

Cheers

Paul DeSousa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 28, 2014

OK cool, I am the new Atlassian administrator and have gotten up to speed a bit on Confluence, Stash, and Bamboo, I am still learning JIRA though, looking forward to learning Jelly. I see this link https://confluence.atlassian.com/display/JIRA/Jelly+Tags#JellyTags-EnablingJelly, is this the best place to start? Also I will return to select answer if this works (I have to reboot JIRA to turn Jelly on and that is an after hours operation)

Paul DeSousa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 4, 2014

@tiago
Hey, now that I have jelly enabled I am a little confiused on how I go and find say:

All closed issues that are over 1 year old.

That is my first and foremote need from there I would like an automatted deletion process by is Jelly or SQL.

Thanks.

Tiago Comasseto
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 4, 2014

Hi Robert, you may use a saved JQL filter to this. In this doc you'll see an example of Jelly script to trigger trasition for specific issues based on a filter (in this case, filter id 11505). We may do something similar to find the issues and delete then afterwards.

Cheers

Suggest an answer

Log in or Sign up to answer