Is there a specific safe way to delete JIRA issues by age? Should this task be run via CLI or directly from the MySQL database? Can the command be more granular by deleting JIRA tickets age and status type? Also, is there a command I can run to preview the tickets to by deleted by age before I execute the delete?
Deleting the issues just on the jiraissue table on the database, will not delete all the related custom fields, etc and is not recommended.
You can run a JQL and bulk delete issues if you would like to do it within JIRA. This will also allow you to check the list of issues you are deleting.
If you are using CLI, you will have to run two commands, first to select the issues and check if the issues are the ones you want to delete, and second to delete the issues.
To add my 2p - don't even think about doing it with SQL, it's messy, complex and you have to understand all of the relationships in intimate detail to get it right. For a single issue, you may have to delete from and/or update up to 36 tables (and that's an old version of JIRA, it's probably more now) For both bulk-edit and the CLI, I'd define a filter (as complex as you'd like - status, date, project, inside leg measurement, any variable you want) and go from there.
You need to construct the JQL to select the issues you want. I assume by age to be something based on either created date or updated date or similar. Once you have the JQL, the you can use getIssueList to see the list and runFromIssueList to remove them.
If you need to manually inspect the list, then bulk delete would be my choice. If you want to automate it, then spend the time to get the JQL right and use the CLI to do it by scheduling it in a job scheduler or Bamboo.
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...
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!
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