Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to find the epic of the parent of a subtask in a JQL query?



I am using Automation to create issues. The same rules are ran under different Epics so so I have tasks and subtasks with the same Summary in different epics. 

In order to link a task with another task in the same epic, I use a JQL branch rule with the following query:

Summary ~ "Summary of Destination Task" and parent = {{triggerIssue.parent}}

where the parent is the epic of the task. I then use a 'Link Issue' action in order to link the issues. This works well. 

I would now like to link a task to a subtask from another task. Summary in the above query is now the summary of the destination subtask I wish to link to. The problem I have is that parent is not an epic in that case but a task. I would need a condition on the parent of the parent in order to get issues only from the current epic. How can I do that?

I tried parentEpic instead of parent but this does not work. 

Thanks in avance, 


2 answers

I wonder if there is anything good about next-gen projects? :(

0 votes
Kevin Bui Atlassian Team Mar 22, 2021

Hi @billy jean ,

Not sure if I'm understanding you correctly, but I believe {{issue.parent.Epic Link}} can be used to return a parent issue's epic. 

So perhaps the smart value you're looking for is {{triggerIssue.parent.Epic Link}}.

Does that work for you?



Hello Kevin, 

Thank you for taking the time to answer and sorry if my question was not clear. My problem is not with the smart value. In my automation rule, the trigger value is a task so the smart value 


works and returns the epic of the trigger issue. The problem is that the issue I am looking for and whose Summary is

Summary ~ "Summary of Destination Task" 

is a subtask. Hence the clause 

parent = {{triggerIssue.parent}}

 does not work because the field parent is a task in that case not an epic. In other words, I would need a field which gives me access to the epic of the parent (or the parent of the parent).

This might be related to the fact (incomprehensible to me) that there seems to be no simple ways for a query to return a list of all tasks and subtasks in an epic. Indeed the function JQL function parentEpic()does not work in a next-gen project and I am not aware of another one which would do that. If that was the case, one could use a clause like:

issue In parentEpic(PRJ-123)

Thanks in advance for any information on how subtasks are related to epics in next-gen projects.


Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you