Listing all Child Issues of a Parent Linked Issue

Vitor Prado December 16, 2022

I'm using Automation in Data Center to create issues and link them as child to an initiative using the "Parent Link" field.

To work further with the automation, I need the be able to access the list of these Child Issues from the Parent using Smart Values.

When working with Subtask rather than Child Issues, I'm able to do that with "issue.subtasks", is there something similar to get all the Childe Issues?

So far, I was able to achieve in JQL using "issue in childIssuesOf("parentkey")", but I need to retrieve the Child Issues with Smart Values.

Is it possible at all?

____

The main reason I need this is because I need to find specific child issues, by it's summary, so a can link it to another child issue. I was doing this using a Task and Subtask structure, and it worked, but now I have the need to do the same using Child and Parent relationship.

This is an example of how I've achieved it using Task and Subtask:

 

Imagem1222.png

 

  • So I pretty much need a substitute for "issue.parent.subtasks" when using a Child / Parent relationship (from the Parent Link field).
  • I've tried to use the "Link Issue" componente from automation, but couldn't figure out how to do so.
  • I'll be working with several child tasks, so I'm creating this automation to set dependency links between them, and one task could have multiple dependencies.

Thanks in advance!

2 answers

0 votes
Sanjay Santhoshkumar June 4, 2023

you could also get child issues using Lookup issues as below and its pretty easy

 

project in (project) and "Parent Link" ={{triggerIssue.key}}

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 4, 2023

@Sanjay Santhoshkumar 

The Lookup Issues action is not available for self-hosted Jira instances.

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 16, 2022

Hello @Vitor Prado 

Can you show us the rule you have constructed so far?

It is possible to use smart values in JQL statements in Automation rules.

Vitor Prado December 16, 2022

Hi @Trudy Claspill 

I've just edited the original text and included an example of what I'm working on, and what I'm trying to achieve.

Though I've figured how to get the results I need with JQL, I couldn't find anywhere in Jira Automation that I could use JQL to filter the issue that I want to be linked to the trigger issue of the branch.

 

Thanks!

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 18, 2022

Hello @Vitor Prado 

Caveat: I don't have a Jira DC instance to work with to look at screens or test suggestions. I'm just going from what I can find in the documentation.

It would be helpful if you showed us the automation rule you are using for your initiative/child issue action.

If I extrapolate from your Task/Subtask example then I think your rule would be something like

Trigger: Manual trigger from the Initiative issue

Actions: Create child issues, setting the Parent Link to the trigger issue

Action: Refetch Data

At this point you would add a Branch and select Created Issues for the Related Issues option. Use the JQL statement you have discovered as a condition for the branch to retrieve the child issues of the initiative.

https://confluence.atlassian.com/automation/branch-automation-rules-to-perform-actions-on-related-issues-993924648.html

What exactly do you want to do with the child issues of the Initiative?

Like Vitor Prado likes this
Vitor Prado December 19, 2022

Hi @Trudy Claspill 

I think there's a few differences in Automation between Cloud and DC, for example on Cloud there is the "lookup issues" functionality and the possibility of create variables, which are not available on DC, and could be very useful for my implementation.

You are right, I took the same steps when working with the initiative/child structure. As follows:

  • First creating the child issues, using json and smart values to fill the "Parent Link" field with the trigger issue key: jira 1.png
  • Then, creating a branch with the mentioned JQL, and adding condition to execute an action on a specific child issue:jira 2.png

I simply need to create a link between specific child issues. In the example, I would like "Child 2" being blocked by "Child 1". But the problem I find is that the linking action in Automation will only let me link it to the las created issue or the trigger issue. I will have multiple links, working as dependencies, that's why I needed to "look up" for all child issues and check the ones that match my condition to create the link. I'm able to to that in the subtask structure, because I can use json and smart smart values to get all the subtasks of the parent ("issue.parent.subtasks") and create the link. I can't find something similar to get all the child issues, other than the mentioned JQL, and neither can I have a branch inside a branch, which would probably solve my problem as well.

Let me know if you need more info.

Thanks for the attention!

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 29, 2022

Have you considered having a separate rule to create links between the child issues of the Initiative?

You could create a rule that triggers when a child issue of the appropriate type is created. Add conditions to confirm that it has a Parent Link, and that it has the summary of one of the two issues that needs to be linked.

Then do a Branch to retrieve all the child issues of the specified parent.

Within the branch use a condition to find the child issue with the summary of the issue needing to be linked.

Add an action to create the link.

This is from Cloud, but it would look something like this. You would need to fix the values in the Condition components to match your needs.

Screen Shot 2022-12-29 at 10.42.38 AM.png

Suggest an answer

Log in or Sign up to answer