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

billy jean March 22, 2021

Hello, 

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, 

Billie

2 answers

0 votes
Simon Wraight December 3, 2021

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

0 votes
Kevin Bui
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 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?

Cheers,

Kevin

billy jean March 23, 2021

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 

{{triggerIssue.parent}}

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.

Billie

Suggest an answer

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

Atlassian Community Events