Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to block specific user role from deleting an issue in certain status?

DunjaJ June 19, 2023

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.

3 answers

1 accepted

0 votes
Answer accepted
Frederik Vantroys
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.
June 19, 2023

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.

DunjaJ June 19, 2023

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. 

Frederik Vantroys
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.
June 19, 2023

Hi @DunjaJ ,

When things depend on the status or transition of status you can do it in the workflow :

  • Go to your Jira instance and navigate to the project where you want to apply the restriction.
  • Click on the "Project settings" gear icon in the sidebar and select "Workflows" (or "Workflows and Permissions" depending on your Jira version).
  • Locate the workflow associated with the issue type that you want to restrict deletion for. Click on the workflow name to edit it.
  • In the workflow editor, find the specific status where you want to block deletion of issues. Double-click on the status to open its properties.
  • In the status properties, add a new property with the following key-value pair:

Key: jira.permission.delete.denied
Value: true

This property will deny the permission to delete issues when they are in this specific status.

  • Save the status properties.
  • Publish the updated workflow to make the changes effective.
DunjaJ June 19, 2023

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.

Nic Brough -Adaptavist-
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.
June 20, 2023

These posts are inaccurate because they were written by an AI that did not understand your question in full, and hence left out the most important bit.

The second one was not far off, you can do this in the workflow.

DunjaJ June 20, 2023

The second solution through the workflow status properties blocks all user roles from deleting issues in specific status. I wanted to block only one user role.

Nic Brough -Adaptavist-
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.
June 20, 2023

There is no way to do that.  The best you could do is block it from everyone, and then add everyone but that one role as people who can delete.

Like DunjaJ likes this
DunjaJ June 20, 2023

I suspected as much but wasn't sure. Thank you for confirming it.

1 vote
Nic Brough -Adaptavist-
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.
June 20, 2023

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.

0 votes
Trudy Claspill
Community Champion
June 19, 2023

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.

DunjaJ June 19, 2023

Thank you @Trudy Claspill I will take this into consideration.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events