I'm using the Rest API to export all issues into our database. The problem is when an issue get's deleted there is no way of knowing that based on the issues export from the API. Is there a flag or someplace I should be looking to know which issues are deleted and which are not?
You know an issue has been deleted when you can't see it any more. You don't need a flag.
It's a bit like putting up a sign that says "please don't read this sign" - utterly pointless and tells you nothing more that you found out by not having the sign in the first place.
Ok, that's great context in which we can try to give you a better answer, but it does open up other problem areas.
A flag for "issue deleted" tells you no more than "issue is not there any more", If you think you need a record of deletion, then your approach to your analysis is wrong, you are going to get the wrong numbers out of it.
You've made "a rod for your own back" here. The database is the worst possible way you can look at Jira data. It's hard to read, not relational, non performant and can't tell you everything you might want to know because most of the logic is done in the application. Stop doing it this way, you're getting the wrong answers.
If an issue is still visible in the database, then it has not been deleted
Could you explain what your "analysis" is looking for? We can probably tell you how to do it easier, faster and more accurately, and coping with deleted issues properly if we knew what you are really looking for.
If an issue has been deleted, it can't be counted - it's not there any more. So your query works fine without any deleted marker. In fact it only works because you don't have a deletion flag. This case proves the point that you don't want a deletion marker!
The query "issuetype = epic and status = done" answers that question, although you may want to add something to exclude Epics that were somehow flagged with the test flag. Issues that have been deleted won't break your query. They would if they had left some form of marker.
If an issue has been deleted, then it is not in the database anymore. Your team have not deleted the issue if you are still seeing it in the database.
I think your Tableau settings are broken (they almost always will be if you've connected it directly to the Jira database)
Again, the issues you are seeing have not been deleted. If they are in the database, they are not deleted.
Jira deletes the whole issue when a human hits the delete button, it kills the current issue record, the comments, the custom field data, links, the hierarchy records, the history and the rest.
They are gone. Rows in the database cease to exist.
The data is not pining, it has passed on. It is no more, it has ceased to be. It has kickedthe bucket, shuffled off its mortal coil and joined the choir invisible. It is an Ex-issue. It is not there anymore.
Could you explain how you think these issues are being "deleted"? (Because it isn't a delete). Do you mean they are "archived"? Or restricted away from general view? Or moved into a project that most people can't see? Or put into a status called "deleted"?
I can not think of another way to explain this.
If you delete an issue in Jira, it is deleted. The data is removed from the database.
That's it. There's nothing more I can explain about issue deletion.
The only thing I can say that is related is that whatever process you think is "delete", it is not. It is something else.
To get any further with explaining this, we need to know what you are actually doing when you think you are deleting an issue.
Your screenshot is too limited to see what you are doing.
If, however, it is the one from the "issue options" menu (not the workflow), then I'm afraid I have to tell you that your BI team are talking utter *******s.
The delete from the tools menu destroys all the data in the database related to the issue.
Again, solve what?
There is no problem with Jira defined here.
The original post is about doing something the wrong way because the people who built it don't know how Jira works. The other problem we seem to be having is that people are not understanding that deleted issues are deleted. Both of these problems are solved by having people understand that deleted issues are deleted.
In almost all enterprise tools (salesforce, hubspot, etc) when records get deleted there is still a flag that persists within the database for that record such as deleted = TRUE or deleted_at = timestamp. I understand what you are saying with it being gone i just don't think that is the proper way to handle this type of thing. It should not be viewable within Jira but that would simply be a frontend distinction. Removing it completely from the API export creates all sorts of downstream effects for people who utilize the API to track issues.
You can see more information regarding the problem in the jira_issues Table Info & Attributes sections:
My thinking is there shouldn't need to be a workaround to handle something as basic as this.