View all deleted issues

How can i view all deleted issues on Jira?

4 answers

1 accepted

This widget could not be displayed.
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

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 http://answers.atlassian.com/questions/75537/how-do-i-find-if-an-issue-has-been-deleted for details on how to see information in the log and a plugin for audit information.

See https://confluence.atlassian.com/display/JIRA/Managing+Project+Permissions 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.

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.

This widget could not be displayed.
Mizan Community Champion Apr 29, 2013

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.

This widget could not be displayed.

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-'||n.nr deleted_items
from jiraissue ji
join project p on (ji.project = p.id 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 (n.nr=ji.issuenum)
where ji.issuenum is null
order by n.nr;


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).

This widget could not be displayed.

I have developed a small app that allows to keep a log of the deleted issues. Please take a look: https://marketplace.atlassian.com/apps/1219171/who-deleted-my-issues?hosting=server&tab=overview

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted 2 hours ago in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

11 views 0 1
Join discussion

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