Forums

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

Delete Epic and your secundary issues

Douglas Oliveira
Contributor
January 16, 2023

I have an epic -> task -> subtask structure, I would like that when deleting an epic all items within it are deleted, I have used the following rule but it did not work

image.png

 

2 answers

3 votes
Trudy Claspill
Community Champion
January 16, 2023

Hello @Douglas Oliveira 

Please be advised that deleting issues is not something that can be undone, unless you have a third party app that intervenes and holds deleted issues in a trash bin.

If you are not using a third party app, then when the issues are deleted they are permanently and irrevocably deleted. You should use extreme care in enabling users to delete issues. Generally speaking I would say that the ability to delete issues should be disabled for all but the most trusted and knowledgeable Jira Administrators.

Douglas Oliveira
Contributor
January 17, 2023

Thanks @Trudy Claspill !

I'm currently building the project, I'm the only admin

Trudy Claspill
Community Champion
January 17, 2023

@Douglas Oliveira 

Being the only Admin does not necessarily mean that you are the only person who has permission to delete issues. The ability to delete issues is a Permission that can be set per project and assigned to people based on membership in a User Group, a Project Role, or other options.

2 votes
Mark Segall
Community Champion
January 16, 2023

Hi @Douglas Oliveira 

You won't be able to trigger deleting the issues within the epic upon epic deletion.

Instead, you probably want a manual trigger that enables users to delete the epic and issues in one shot.  It would look like this:

  • TRIGGER: Manual
  • CONDITION: Issue Type = Epic
  • BRANCH (Stories or Other Issues in Epic)
    First we'll drill into the Epic and delete its children
    • ACTION: Delete Issue
  • ACTION: Lookup Issues
    • "Epic Link" = {{issue}}
  • CONDITION (Advanced)
    • {{lookupIssues.size}}
      Less Than
      1
  • ACTION: Delete Issue

To execute, you would just click into the desired Epic, select Rule Executions and pick this rule. 

Note - If you have more than 50 children in the Epic, you'll need to execute the rule multiple times.  This is why I have the lookup issues and advanced condition after the branch activity.

Douglas Oliveira
Contributor
January 17, 2023

Hi @Mark Segall 

Thanks for the response.

i cant find this option:

image.png

Mark Segall
Community Champion
January 17, 2023

Under Conditions, you should have an option for Advanced Compare Condition

Douglas Oliveira
Contributor
January 19, 2023

Hi @Mark Segall

thanks for answering. Well, the rule works to exclude child items, but I would like the Epic to be excluded as well, is it possible to do that?

Mark Segall
Community Champion
January 19, 2023

the rule works to exclude child items

Apologies, but I'm not sure I understand what you mean by "excluded".  The rule should delete everything below the epic and then once its confirmed that all child issues have been deleted, it will delete the epic as well.

Also, as mentioned above, if you have more than, I believe 100 child issues, it will not delete everything in one execution due to automation performance constraints.  In this event, you would need to execute the rule multiple times until that last condition is satisfied, at which point the Epic would be deleted.

I hope this helps.

Douglas Oliveira
Contributor
January 19, 2023

That's really it, however the rule is not excluding the epic at the end

I did in this way:

image.png

Mark Segall
Community Champion
January 19, 2023

Hmm - This tells me that it's still seeing issues in that epic for whatever reason.  Let's try adding a Log Action just after the lookup issues action with this:

Issues Remaining: {{lookupIssues.size}} ** {{lookupIssues}}

Then share a screenshot of the log.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM Trial
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events