We use Jira Data Center. I would like to get the list of child issues under a Theme.
We have 2 issues of Issue type Theme - say TH-1 andTH-2
Our hierarchy goes like Theme -> Initiative -> Epic
I would like to get the list of Initiatives and Epics that are child issues of TH-1 and TH-2. Is there a way I could get this using JQL?
Additional Info - We have Advanced Roadmaps and Script Runner
TIA
Hello @Ganeshkumar Meenakshisundaram Welcome to the community!
issue in childIssuesOf("TH-1") AND issuetype in (Initiative, Epic)
This should get the Initiatives linked to TH-1 and Epics linked to those Initiatives.
Hope this helps!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To get the list of child issues under a Theme in Jira Data Center, you can use JQL (Jira Query Language) with the `issueLink` function.
Here's a sample JQL query to get the child issues (Initiatives and Epics) under a specific Theme:
```
jql
issueLinkType = "Child" AND issueLinkDestinationType = Theme AND issueLinkDestination = TH-1
```
This query will return all issues that are children of the Theme TH-1.
To get the child issues for both Themes (TH-1 and TH-2), you can use the `OR` operator:
```
jql
issueLinkType = "Child" AND issueLinkDestinationType = Theme AND (issueLinkDestination = TH-1 OR issueLinkDestination = TH-2)
```
This will return all child issues under both Themes.
If you want to filter the results to only show Initiatives and Epics, you can add additional JQL clauses:
```
jql
issueLinkType = "Child" AND issueLinkDestinationType = Theme AND (issueLinkDestination = TH-1 OR issueLinkDestination = TH-2) AND issueType IN (Initiative, Epic)
```
This will return only the Initiatives and Epics that are child issues of the specified Themes.
Note that the `issueLinkType` and `issueLinkDestinationType` fields are available in Jira Data Center, but not in Jira Cloud.
With Advanced Roadmaps, you can also use the `parentEpic` and `parentInitiative` fields to query for child issues. For example:
```
jql
parentEpic = TH-1 OR parentInitiative = TH-1
```
This will return all child issues under the Epic or Initiative with the ID TH-1.
Script Runner can also be used to create custom scripts and queries to retrieve the desired data. However, JQL is usually the most straightforward way to achieve this.
Hope this helps! Let me know if you have further questions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Ganeshkumar Meenakshisundaram
With standard JQL query it is not possible to get what you want. You can try to use "order by" but still I'm not sure that you will get right order.
Regards,
Seba
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.