Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Deleted issues still exist in the database

Grace Dehergne March 17, 2023

Hello , 

 

We are building customized metrics dashboards (something that JIRA or off the shelf applications can't provide)  using Tableau and Snowflake (with data coming from Jira).  For that matter our IT  team populates Snowflake with Jira Tables. However, the deleted issues still exist in the database whereas in the Jira UI, you cannot see it anymore.  It makes our metrics report unreliable.  How can we know (field value or other indication) that the issue has been deleted?

2 answers

1 accepted

2 votes
Answer accepted
Radek Dostál
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.
March 18, 2023

First things first, you're talking about external apps, most people here don't know how they work, or what sort of connectors they are using, nor what the actual data flow is between them.

I can infer from this that they're reading data from the database, which is the first semi faulty step since there are several better ways to read the data, which coincidentally is what Jira is already doing, so now there are multiple apps reading and interpreting the data from the db in their own way. I'm not saying it can't be done nor that there never ever could be the use case for it, but I am trying to indirectly say that's a bad idea on principle.

If you claim they still exist in the database, it would be useful to us to know what specific tables you have in mind, or what makes you think that is the case. As you surely know, as you're tinkering with the db, Jira has many tables and they often have to be joined to make any sense of them.

I wouldn't be too surprised if the data was being imported incrementally and old one was not deleted/discarded in those other apps, because they surely should be deleted from Jira's db if the issue is deleted. It won't be deleted when the issue/project is archived, but we are back to using table joins with conditions.

Long story short, such questions are too generic to answer, so we will need a lot more details starting with what tables you see still contain data for deleted issues. Assuming that jiraissue table is the primary one, which stitches everything together, a simple

SELECT p.pkey || '-' || ji.issuenum as "Issue Key" FROM jiraissue ji JOIN project p ON p.id = ji.project WHERE ji.id = ?

would confirm whether such an issue exists in the database, assuming it is being shown in other apps.

Grace Dehergne March 20, 2023

Hello @Radek Dostál 

Thank you for your reply! These are the tables that still contains the deleted issues : 

JIRA_ODS_ISSUE

JIRA_ODS_ISSUE_HISTORIES

JIRA_ODS_HISTORIES

I wonder if there is a table that indicates the issue has been deleted...

Thanks in advance!

Kind regards,

Grace

Radek Dostál
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.
March 20, 2023

There is no table for deleted issues - if they are deleted, that's it, deleted. There is no audit log.

The main issue is that these 3 tables are not out of box tables though, and shouldn't belong to any 3rd party apps either (plugin tables start with "AO_").

Either way though, these tables are not part of Jira out of box, something or someone created them manually.

Like Kai Becker likes this
Grace Dehergne March 20, 2023

Thanks for your reply!

0 votes
Kai Becker
Community Champion
March 17, 2023

Hi @Grace Dehergne ,

I haven't had any customer instance so far, where deleted issues still show up in the database.
How do you still find these deleted issues? Are they still persistent in the jiraissues table?

Do you use a Server setup or a Data Center setup with multiple nodes?

Grace Dehergne March 20, 2023

Hi @Kai Becker 

Thanks for your reply :-) !  What I am sure is that we are Not using Jira Cloud. As I said in the reply earlier, these are the tables that still contain the deleted issues :

JIRA_ODS_ISSUE

JIRA_ODS_ISSUE_HISTORIES

JIRA_ODS_HISTORIES

I woudn't mind to join JIRA_ODS_ISSUE to table that indicates the issue has been deleted...

Thanks in advance for your reply !

Kind regards

Grace

  

Suggest an answer

Log in or Sign up to answer