View all deleted issues

How can i view all deleted issues on Jira?

4 answers

1 accepted

4 votes
Accepted answer
Henning Tietgens Community Champion Apr 29, 2013

You can't. If an issue is deleted, it's gone.

Maybe you can analyze access logs to get more information but I'm not sure if you can see which issue was deleted.


Henning Tietgens Community Champion Apr 29, 2013

As for this reason, deleting issues on our system is only allowed for a very small group of people. Normally users should close issues with a meaningful resolution.

Are you sure? it doesn't make sences? if my employee accidently deleted few issues, why can't i review all deleted items?

Henning Tietgens Community Champion Apr 29, 2013

See for details on how to see information in the log and a plugin for audit information.

See on Delete Issues permission and the recommendation from Atlassian to "Think carefully about which groups or project roles you assign this permission".

Hennings is absolutely correct - delete really does mean delete. The only thing you can see is a "hole" in the numbers in the project (which may also mean "issue moved")

There's a plugin which can audit deleted issues to some extent (it logs who, when and key) and you can keep the "issue deleted" emails too, but that's it.

One other option to build on Hennings "restrict delete to only a handful of users" is to have a "waste bin" project - let people move issues in there if they really want rid of them.

Like 1 person likes this

Another thing to do is, configure your notification scheme so that whenever an issue is deleted, an e-mail is sent to a senior person in your project. Even better when the e-mail is sent to a group of people.

It makes perfect sense, that a deleted issue really is deleted – its contents gone.

But should not the act of deletion itself still be recorded in changeitem/changegroup tables, though?

On a related note, can someone suggest a clever SQL query, which would list holes in the jiraissues table? Standard SQL preferred, obviously, but even a MySQL-only variant would be most appreciated... Thanks!

How?  The changegroup table holds a reference to the issue, but the issue has gone, so there's nothing it can record.  The data structure simply doesn't support it, without rewriting the entire codebase.

The changegroup table holds a reference to the issue, but the issue has gone

So what? It also holds a reference to the user, who may be deleted some time after performing the change. This does not break anything...

No, you've missed the point - it contains a key reference to the issue by its id.  So when you ask "which issue did you delete", JIRA has to say "I dunno, it's gone"

When it retains users, it's just the login name.  So the answer is "all I can tell you is a user who logged in as <username>", not "I dunno because there's no data to look up".   (Note also, it's bad practice to delete users who have done things)

So when you ask "which issue did you delete", JIRA has to say "I dunno, it's gone"

At least, the record would remain for any future audit. Joining the changegroup and changeitem tables, I could say, who deleted an issue and when.

When it retains users, it's just the login name.

Yes. And a samilar kind of record could be added upon issue deletion. The FIELDTYPE could say something like "Deletion", the FIELD would be "Issue", the old value – issue key (FOO-1). The existing data-model does not need changing.

Some time later JIRA could provide an interface to it as well, but that's secondary...

Sorry, I'm not saying it should not be logged, just that this table is completely the wrong place to do it - because the table is tied to issues.  Which you've just removed.

I'd put it in a dedicated table, or even just the "issue moved" table with an empty "to" field - that's enough data to tell us it was deleted.

You cannot view deleted issues in JIRA .

If you want you can compare the latest auto xml backup .

Yes, restore it into a test replica of your JIRA instance and do a comparison using SQL. That's the easiest method.

However, ONLY IF auto xml backups have been enabled.

Here's an Oracle Database select statement to at least list the "holes" within a project (i.e. those items which were deleted).
Of course it does not list the content of the items, as that is gone.

define PROJECTKEY = 'LCH';  -- Project Key

select '&amp;PROJECTKEY-'|| deleted_items
from jiraissue ji
join project p on (ji.project = and p.pkey='&amp;PROJECTKEY')
right join (SELECT LEVEL nr FROM dual
            CONNECT BY LEVEL &lt;= (select p.PCOUNTER from project p where p.pkey='&amp;PROJECTKEY') 
           ) n on (
where ji.issuenum is null
order by;

Note: The statement joines the jiraissue table with a "virtual number-table" from 1 to pcounter (max-number) on the project.
On other databases, such as MySql you may need to create a table with a number column and fill it with numbers from 1 to the project-counter (number of last created item).

I have developed a small app that allows to keep a log of the deleted issues. Please take a look:

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,750 views 18 21
Read article

Atlassian User Groups

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!

Find my local user group

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

Groups near you