Forums

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

Delete all child issues when parent is Deleted

kalyan_kumar1 August 12, 2025

When a Project (parent issue) is marked for deletion, all associated child issues across the hierarchy should also be deleted automatically.

Hierarchy Structure:

  • Parent: Project

    • Child Issues: Service

      • Child of Child: Activity

        • Sub-tasks

Expected Behavior:
If a Project is flagged for deletion (e.g., via a "Delete" value in a field), then:

  • All related Service issues,

  • Their respective Activities, and

  • All associated sub-tasks
    should also be deleted.

Looking for suggestions on the best approach to implement this deletion logic within Jira, preferably via automation

3 answers

0 votes
Cristiano Alves -Appfire-
Contributor
August 12, 2025

Hello @kalyan_kumar1 ,

 

I'm Cristiano, with the Appfire Team here.

Multiple-level hierarchy in native JQL is not as simple, as the function. portfolioChildIssuesOf() requires a item key, which does not allow for multiple queries, or works on team-managed projects.

In the extension our team works, Jira Misc Workflow Extensions, you are able to set up simple (with a very easy to understand interface) post functions like the one below, which I set up for a custom status (delete) which would query for childs, childs of childs and sub-tasks.

Delete Mult.png

If you need any help setting this up, or even further functionalities from our extension, feel free to contact our support team.

 

Regards,

0 votes
Trudy Claspill
Community Champion
August 12, 2025

Hello @kalyan_kumar1 

You can use the portfolioChildIssuesOf() function to find all child issues at all levels (per the issue type hierarchy) of a single issue.

https://support.atlassian.com/jira-software-cloud/docs/search-for-advanced-roadmaps-custom-fields-in-jql/#Child-work-items

Theoretically you could use such a query in a For Related Issues: JQL branch in an automation rule and delete each issue found. 

I have not tested this out. One area I'm not sure about is what happens with Subtasks. I don't know if they will be deleted automatically with their parent or if they need to be deleted directly.

0 votes
Marc - Devoteam
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.
August 12, 2025

Hi @kalyan_kumar1 

When you flag this, you need to find all the related issues, in a multiple level hierarchy this can only be done by using a 3rd party app that has JQL functions to accomplish this as ootb JQL can't do this.

Then using this JQL in automation this could theoretically delete all found issues

Trudy Claspill
Community Champion
August 12, 2025

Actually @Marc - Devoteam that is not entirely true.

Refer to

portfolioChildIssuesOf("work item key") 

Suggest an answer

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

Atlassian Community Events