Why is there no way to capture Issue Deletions in the Jira API?

Chris Lenzini April 19, 2018

Hello - I hope I'm wrong.

 

We use the Incremental Rest API (pagination through ticket records, events, etc) ... to dump Jira data into our master corporate data warehouse and BI system.

 

I recently noticed that there is (seemingly) no way to capture that a ticket is deleted, or has been deleted. Is there a delete event or delete notification with an issue ID? Anything?

 

I know an alternative is to use the (deprecated) direct SQL database sync. Still, doing a full sync of the Jira SQL backend will always take longer than an incremental load. Also, the SQL database presents not only direct performance issues on the Jira instance, but also poses security issues because it's all-or-nothing access, unlike the incremental Rest API.

 

I suppose installing the Jira ticket Auditor app may aid in the future somehow --- still, anyone have a best practice for capturing these ticket deletions? Pretty sloppy of Jira not to include it.

3 answers

0 votes
Alfonso Leiva [ServiceRocket] April 20, 2018

In Jira you have Listeners, and I think that would be the best way to capture the issue deletion events.

0 votes
Chris Lenzini April 20, 2018

I think it will be far easier just to leverage the SQL backend at this point. What API endpoint stores these admin audit logs? or Does that require the Jira Audit app? The Jira software was designed to simply delete records without any evidence or log it appears. This is foolhearty. Even if it's legally required to destroy all meta-data, allow the end-user that choice. Further still, you can keep the issue id and just one datapoint: deleted. That's what Zendesk and numerous other ticketing apps do. It's extremely useful if you're going to make incremental data loads (common practice). Jira requires a full refresh of all existing data to tally which tickets have been deleted (the ones that are now missing). If you never captured a ticket before deletion, there's no record of it other than gaps in Issue ID numbers. Definitely a glaring hole, but it is what it is. There are work-arounds I suppose.

Joe Pitt
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 20, 2018

JIRA has been that way forever and I doubt you'll get it changed. I, and many other long time JIRA users, never delete issues. the forum is full of people desperate to get issues deleted in error back. I use a transition that only the project admin can execute that requires selecting a reason for deletion and a post function setting the resolution to 'Deleted'. 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 20, 2018

Stay well away from the database, it's really not designed to be read.

A hole in the issue key sequence does NOT necessarily mean "deleted", it can mean moved as well.  You would also need to check the project key sequence in case someone deleted something and have not created another.

Chris Lenzini April 20, 2018

Yes it might be prudent to simply prevent the deletion of issues if that is even possible. Nic - I mean issue ID, not issue key. Issue ID is immutable.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 20, 2018

That's even worse than the issue key.  Immutable yes, but they're not sequential (a hole of 10 in the numbers could be representing anything from 0 to 10 deletes) and they're not related to the project.

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 20, 2018

There's no record because there's nowhere to keep it, the issue has been removed.

There is a "delete issue" event fired every time though, and the built-in admin audit log traps and logs those when it's enabled.

Suggest an answer

Log in or Sign up to answer