How to capture the click of the delete buttom from the "More" menu when someone is trying to delete an issue.

I would like to capture the keystroke or click which executes the delete button when a user is trying to delete an issue.  I would then like to run a SIL script or Javascript which will check if any worklogs exist on the issue.  If they  do exist then prevent deletion and preserve the issue.  We have had users inadvertently delete issues with worklogs attached to them.  I believe that when this happens the action is irreversible and worklogs are unrecoverable.

6 answers

1 accepted

0 votes
Accepted answer

You can remove the permissions from "Delete" altogether and provide a dummy "Delete" issue operation (with the help of a plugin) that has an additional validation of worklogs. The new issue operation will not allow delete if the issue has worklogs.

Since the new 'Delete' behaves similar, except for the worklog validation, users will not be aware of any changes.

Hi Craig,

In the Project Permission scheme you can define who can and can not delete issues. Check this page and look for "Delete Issues":

All the best

Björn Brynjar

 Hi Björn,

I understand the permission feature in Tempo. We have made a policy decision to allow a user to delete an issue they created inadvertently.  And allow only Tempo Project admins to delete other user's worklogs and only those in their project.  This presents a risk of inadvertent deletion.  We want to continue to allow this in order to not have to maintain groups and roles in a more granular fashion.  Notwithstanding we would like to capture and stop inadvertent deletions globally and grammatically, not by project permission which is what we have in place now.  Any insight on how to do it that way?



Hi Craig,

Nobe sorry don't know how to do it that way smile

Another solution (you probably know about also), is to make a policy decision to not allow regular users to delete issues and simply close the inadvertently created issues. We used this where I worked previously and it worked perfectly wink

But I understand it can be challenging to convince people to try a different way...

All the best

Björn Brynjar

Or use a security scheme. Allow some role to change the security level and the the "deleted" issues disappear from most people's views. 

Matt, we do that now with permission schemes.  Users can delete their issues, projects admins can delete only their projects issues.  Issue security only limits who can see an issue.  We need to retain our current permissions , but flag those issues with worklogs only at the time of attempted deletion: Not who can delete by group, or role, which requires management of the group, user and/or role. 

Jobin, what plugin were you referring to?  Groovy (Script Runner) or something else?


A simple JIRA plugin that has an issue operation exposed in it. I don't think we can leverage script runner for it because you will need a web-item and webwork module in it.

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,655 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