Prevent deletion of issue with worklog

Patrice Champet March 1, 2021

Hi there,

Whereas most of the users are not able to delete issues on our instance, we have some project Leaders that are able to do so.
We have also some uses cases where teams need to create and delete issue as they are creating their backlog.

We recently face an issue with an user deleting, by mistake, a Jira Issue with a lot of worklog. It makes our timesheet reporting wrong and data recovery was a nightmare...

We identified two improvment:

  • the first one, take a closer look at issue deletion permission and clean the existing rights.
  • the second one, find a way to prevent issue deletion if the issue has some time logged on it.

 

So, my questions are:

  • Do you have any idea, on how we could prevent issue deletion based on the time logged on the issue ?
  • Do you have any other suggestion to improve our use of Jira on this specific topic ?

Thanks a lot !

 

2 answers

0 votes
Rudy Holtkamp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 11, 2022

What you can do is to remove the permissions for everybody to delete issues, except for 'Automation for Jira'

Then users can mark issues for deletion with e.g. a label 'delete-this-issue'.

An automation rule will run every time the field labels changes. If it has the 'delete-this-issue' label you can check if there is a worklog. If there is, you can e.g. add a comment and remove the label. If there is no worklog the issue can be removed.

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 1, 2021

Hello @Patrice Champet 

This is another example of why it is a very bad idea to allow users to delete issues.

I strongly recommend that instead of allowing Delete Issue permissions, you modify your workflows to include a new status in the "Done" Status Category specifically for "deleted" issues. If those issues truly must be removed entirely and in a completely unrecoverable way, then you might look at using and Automation rule to find all the issues in the Status and delete them only if they have no Worklog entries (or where Time Spent=0).

If you are unwilling or unable to restrict the Delete Issue functionality, here is another option to investigate: 

I know in Classic project Permission Schemes there is a separate permission for being able to delete worklog items. Do you enable that permission for any user?

You might look at disabling that permission for all users, and then experiment to see if a user that has Delete Issue but not Delete Worklog is able to delete an issue with worklog data.

Suggest an answer

Log in or Sign up to answer