How to block a user role from deleting an issue when the issue is in certain status?I have set up property key and property value for a status in the workflow but that blocks all user roles from deleting an issue in that status and I need to block a single user role.Thank you.
Hi @DunjaJ ,
you can utilize Jira's Permission Scheme settings. Here's how you can achieve this:
Navigate to your Jira instance and go to the project where you want to apply the restriction.
Click on the "Project settings" gear icon in the sidebar and select "Permissions" (or "Permissions and roles" depending on your Jira version).
In the Permission Scheme settings, locate the "Delete Issues" permission.
Click on the "Actions" (or "Edit") button next to the "Delete Issues" permission.
In the "Delete Issues" configuration, you will see a list of user roles. Locate the user role that you want to block from deleting issues in the specific status.
Remove the user role from the "Delete Issues" permission by unchecking the corresponding checkbox.
Save the changes to the Permission Scheme.
Thank you @Frederik Vantroys for your answer. I have configured the Permission Scheme but what I need is to block users from deleting issues when the issue is in a specific status.
When things depend on the status or transition of status you can do it in the workflow :
Key: jira.permission.delete.deniedValue: true
This property will deny the permission to delete issues when they are in this specific status.
Thank you @Frederik Vantroys .
For example, I want to allow Product Owner to delete issues while they are in To Do status but block Product Owner to delete issues when they are in In Progress status.
Hello @DunjaJ
In general permitting the deletion of issues is a bad idea.
Deleting an issue is a permanent and irrevocable act. If a user deletes an issue by accident, that issue is permanently gone and can't be recovered.
It is a better practice to set such issues to a "done" status with a Resolution of "delete", or even use a special "delete" status. You can either set filters/boards to exclude those issues or have those issue reviewed to ensure permanent deletion is the proper action.
Thank you @Trudy P Claspill I will take this into consideration.
You have a property that blocks all roles from deleting already, but as Trudy mentions, you should really not allow delete for anyone.
I would recommend removing delete permission for everyone in all status, but for the cases where you do need it status, add a property to the status that allows certain groups or roles to do it.
It looks like you're new here. Sign in or register to get started.