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 vote

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":

https://confluence.atlassian.com/display/JIRA/Managing+Project+Permissions

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?

Thanks

--Craig

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

0 vote

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?

--Craig

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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Amir Kazemi
Posted an hour ago in Jira

We want to know what Jira Service Desk apps you're using!

Hi Community! My name is Amir and I’m on the Jira Service Desk product marketing team at Atlassian. Our team would love to understand how you’re leveraging our ecosystem for Jira Service Desk. Wha...

9 views 0 2
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