Need Help with JQL query to get children for multiple initiatives.
. Children issue type can be Epic, task, subtask, story, user story.
Example -
Need list for all issues under 4 initiatves.
project = EDA AND child of("EDA-1", "EDA-2","EDA-3","EDA-4")
Here EDA-1,2,3,4 are initiatives and have childrens with different issue types.
Hi @Manisha Patel Welcome to the community!
To get all child issues (Epics, Tasks, Subtasks, Stories, User Stories) for multiple initiatives in JIRA using JQL, you can use the issueFunction in hasLinks() function provided by the ScriptRunner plugin. However, if you don't have ScriptRunner, you'll need to use a different approach since JQL alone doesn't support querying multiple parent issues directly.
JQL-
project = EDA AND issueFunction in hasLinks("is child of", "EDA-1") OR issueFunction in hasLinks("is child of", "EDA-2") OR issueFunction in hasLinks("is child of", "EDA-3") OR issueFunction in hasLinks("is child of", "EDA-4")
If you don't have scriptRunner then use jql like-
project = EDA AND (parent = EDA-1 OR parent = EDA-2 OR parent = EDA-3 OR parent = EDA-4)
I am running into a similar issue as the OP. I'm trying to display all of the child issues of multiple initiatives since it is multiple teams and each team has a different initiative they are working on. We have ScriptRunner for Data Center so I tried to use the issueFunction in hasLinks("is child of", issuekey) but apparently we have two "is child of" issue links (which irks the crap out of me and is terrible). So I tried to do the second query you recommended with (parent = issuekey OR parent = issuekey) and it is just returning all the issues in the project, which is like 36,000. Any other suggestions to try?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Katie_R , any chance that you have OR instead of AND after "project = EDA" ? I can't think about any other reason to get all issues from the project.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My team figured it out, thank you! This is what we ended up doing for anyone out there that needs to find all children of Initiatives AND Epics based on Component (or any other field). This is to feed Advanced Roadmaps:
filter = "Projects Subfilter" AND (Component in (25, 24, 22, 21) OR issueFunction in portfolioChildrenOf("issuetype = Initiative AND Component in (25, 24, 22, 21)) OR issueFunction in issuesInEpics("issuetype = Epic AND Component in (25, 24, 22, 21)) OR issuefunction in portfolioChildrenOf(\"issuetype = Initiative AND Component in (25, 24, 22, 21)) ORDER BY Rank ASC
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.