View all deleted issues

liadlivnat April 29, 2013

How can i view all deleted issues on Jira?

4 answers

1 accepted

8 votes
Answer accepted
Henning Tietgens
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.
April 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
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.
April 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.

liadlivnat April 29, 2013

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
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.
April 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".

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 29, 2013

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 # people like this
Sameera Shaakunthala [inactive]
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.
April 29, 2013

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.

Mikhail T May 19, 2016

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!

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.
May 19, 2016

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.

Mikhail T May 19, 2016

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

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.
May 19, 2016

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)

Mikhail T May 19, 2016

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

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.
May 19, 2016

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.

4 votes
Acid Oranges July 5, 2018

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

kachapman February 20, 2020

@Acid Oranges  HI - will this become available for cloud? Thanks

Acid Oranges February 21, 2020

@kachapmanNot on the short term I am afraid.

2 votes
Mizan
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.
April 29, 2013

You cannot view deleted issues in JIRA .

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

Sameera Shaakunthala [inactive]
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.
April 29, 2013

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.

1 vote
Leonard Chew
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.
July 6, 2016

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

Suggest an answer

Log in or Sign up to answer