Forums

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

How to Restrict Parent Deletion When its Children Are Linked in Jira Cloud?

Digvijay Singh Gehlot
Contributor
July 5, 2025

Hi Community, 

I have Parent issue type as Portfolio Epic and it's Children issue type as Feature in Jira Cloud

I want to restrict Parent issue to be deleted by a user when it's Child issues are linked. 

That is, if user is viewing the Parent and then clicks on 3 dots (...) "Actions" And clicks on Delete, then user should be restricted to delete the Parent by showing an error message "Parent can't be deleted as Child is linked to it". 

Is this something we can configure via jira automation, jira workflow property or conditions or scriptrunner? 

Please assist on the above. 

Thanks in advance. 

2 answers

3 votes
Trudy Claspill
Community Champion
July 5, 2025

Hello @Digvijay Singh Gehlot 

Automation Rules cannot prevent an action from happening. Automation Rules are triggered by the completion of an action. The Rule would not be triggered until the issue was already deleted.

When issues are deleted they are permanently removed from Jira Cloud. They can't be recovered unless you have added a third party app that specifically provides that functionality. Because of this you should restrict the Delete Issue permission to only your most trusted users, such as your Administrators. For other users you could give them a way to indicate the issue should be disregarded, such as a Status they can use or a field they can set. That would allow the user to change their mind and reinstate the issue. If you then want the issues permanently deleted, you could have admins review the flagged issues periodically.

With the use of a Status or custom field, and without any third party apps, Automation Rules could be used to detect that change in an issue, check if the issue had child issues, and send an email to the user that took the action while also reversing that change.

With third party apps other solutions may be available. 

I don't know if it is possible to intercept the Delete Issue event before the issue is actually deleted. I think there must be a way since there are third party apps that do that, but I don't know exactly how they do that.

If you revoked the users' permissions to delete issues, and instead gave them a Delete Issue transition in the workflow, them with an app like ScriptRunner you could add a validator that would check for no child issues, and a Post Function that would execute the deletion if the validator passed. But again, the issue is permanently deleted and cat be recovered if it was deleted by mistake.

0 votes
Tinker Fadoua
Community Champion
July 5, 2025

Hi @Digvijay Singh Gehlot 

In this case I will recommend a validator so user will be refrained from performing the action.

Definitely if you have ScriptRunner it is the best way to handle it.

Best,

Fadoua

Karan Sachdev
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 7, 2025

Hey @Tinker Fadoua

Validators can restrict the users from performing workflow transitions, not the delete action. So this approach won't work here.

Tinker Fadoua
Community Champion
July 7, 2025

@Karan Sachdev & @Digvijay Singh Gehlot 

My bad I was thinking done.

To hide the Delete - How about a Script Fragment with a condition since the reporter mentioned ScriptRunner.

Best,

Fadoua

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events