Stop Sub-tasks from being parented to Epics with Jira Cloud Automation
Platform Notice: Cloud Only - This article only applies to Atlassian apps on the cloud platform.
Summary
As per the Atlassian Community announcement, Jira’s user interface (UI) now restricts creating Sub-tasks directly under Epics. However, loopholes remain: Sub-tasks can still end up under Epics via parent field updates, cloning, or automation
A Jira Automation rule can be set up to monitor when a Sub-task’s parent is set to an Epic. If this happens, the rule automatically reverts the parent to its previous value, keeping the hierarchy clean and consistent. This automation ensures that if someone tries to change a subtask’s parent to an Epic, which is not supported in Jira, the change is automatically reverted and a comment is added to explain why.
Solution
The steps below walk through setting up an Automation rule that does the following:
Runs whenever a sub-task’s parent is changed
Checks if the new parent is an Epic
If so, it reverts the change and adds a comment to explain why
Step 1: Go to Project Automation
Open your Jira project
In the left sidebar, select Project settings > Automation
Step 2: Create a New Rule
Select Create rule (or Add rule)
Choose Custom rule (or Blank rule)
Step 3: Set the Trigger
Select Add trigger
Select Field value changed
In the Field dropdown, select Parent
Under Change type, select Value added
Step 4: Add a Condition – Only for Subtasks
Select New condition
Select Issue fields condition
Set Field to Issue type
Set Condition to Is one of
Set Value to Sub-task (or your subtask type name)
Step 5: Lookup the New Parent Issue
Select New action
Select Lookup issues
In the JQL field, enter:
issue in ({{triggerIssue.parent.key}})
Step 6: Condition – Is the New Parent an Epic?
Select New condition
Select Advanced compare condition (or Compare two values)
For First value, enter:
{lookupIssues.issuetype.name}
For Condition, select equals
For Second value enter: Epic
Step 7: Lookup the Previous Parent Issue
Select New action
Select Lookup issues
In the JQL field, enter:
issue in ({{fieldChange.fromString}})
Step 8: Revert the Parent Change
Select New action
Select Edit issue
For Field, choose Parent
Set the value to:
fieldChange.fromString
Step 9: Add a Comment Explaining the Revert
Select New action
Select Add comment
Enter the comment text, for example:
Hey [~\\\\{{initiator.accountId}}],The parent value has been changed back to the previous value as reparenting a sub-task to an Epic directly is not recommended in Jira.
Step 10: Name, Save, and Enable the Rule
Select the rule name at the top and give it a meaningful name, for example: Prevent Subtask Reparenting to Epic
Select Turn it on or Enable
Was this helpful?