Forums

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

Is it possible to show the "Delete" button selectively for different issue types in a single project

SWAPNIL SRIVASTAV
Contributor
April 2, 2020

Is it possible to show the 'Delete' button for one issue type and hide it for other issue types in a single project in JIRA? If so, how can it be achieved?

Also, if it is possible, can we hide it for a particular project role?

 

3 answers

1 accepted

2 votes
Answer accepted
Leo
Community Champion
April 2, 2020

Hi @SWAPNIL SRIVASTAV,

I would vote for @Joe Pitt answer. don't delete any issues 

but if you want to go with your requirement still, you can achieve that through workflow status property

1. Create separate workflow for issue type for which you want to hide/remove delete issue permission

2. Update property for all statuses in that workflow with below

Key: jira.permission.delete.denied

value: true

 Note: this is to remove permission for all

but if you want to allow users who are all part of particular role then the property is 

Key: jira.permission.delete.projectrole

value: 1000(id of particular role you want to allow delete issue permission)

3. Publish the workflow

 

Hope this helps

 

BR,

Leo

SWAPNIL SRIVASTAV
Contributor
April 2, 2020

Hello @Leo ,

Thank you for your reply. I tried and it worked. I am going to accept this answer.

I just have an extended question. Is it possible to make it conditional?

e.g. If the issue I am trying to delete is a subtask, so is there any way to allow deletion for a project role only when the parent of that subtask is in 'Open' state?

Leo
Community Champion
April 2, 2020

No, you can't add condition like this. it's just a property of the status and won't work with condition as per my knowledge

1 vote
Joe Pitt
Community Champion
April 2, 2020

Do not delete issues. When you delete it is GONE. Hardly a week goes by without someone wanting to restore an issue. Deleting issues will come back and bite you when it is the most inconvenient. I suggest closing with a resolution value of Deleted anything you want to delete. I implement a special transition only the project lead can execute and it requires filling in a reason field from a select list (such as entered in error, OBE, Duplicate, Other) and explanation text.
Deleting issues destroys historical data. Missing issue numbers will eventually cause a question about what it was and why was it deleted even if it was done properly. Missing data always brings in the question of people hiding something that may have looked bad.

The only viable way to restore an issue is to create a new instance of JIRA and restore a backup that has the issues. Then export them to a csv file and import them to your production instance. You will lose the history.

SWAPNIL SRIVASTAV
Contributor
April 2, 2020

Hello @Joe Pitt ,

Thank you for your reply. I will forward the suggestion to my client.

0 votes
Vikrant Yadav
Community Champion
April 2, 2020

@SWAPNIL SRIVASTAV We can hide an issue type for a particular role, this can achieved via groovy script for this script runner plugin is required. 

 

Do you have this plug in installed ?

SWAPNIL SRIVASTAV
Contributor
April 2, 2020

Hello @Vikrant Yadav ,

No, I do not want to hide the issue itself. 

I have a project A and I have two issues present in it i.e B and C. Now, I want that issue of type B should be allowed to be deleted by a particular project role but issues of type C should NOT be allowed to get deleted (Let alone from that particular role). 

Is it possible to do so in JIRA?

I understand that giving 'Delete Issue' permission from permission scheme to a particular role will allow that role to delete issues of all issue types in that project.

Suggest an answer

Log in or Sign up to answer