Tasks - Where are my Children/Grandchildren?

Melissa C
Contributor
February 5, 2025

Hello!

I'm looking for my Children/Grandchildren!! Also known as Tasks

Background: 

We have set up our hierarchy as follows:

Initiatives/Epic/Tasks  OR
Parent/Child/Grandchildren or Grandparents /Parent/Child (Depending on how you look at it)  

I'm able to get:
--Parents/Grandparents
   "Planned Release" ~ "P-25MR1*" and issuetype in (Initiative) -->(Saved as Filter=173059)

--Parent/Child 
    issueFunction in portfolioChildrenOf('"Planned Release" ~ "P-25MR1" and issuetype in (Initiative))') AND project = XYZ  --> (Saved as Filter=173068)

But I'm not able to get the Tasks (Child/Grandchildren), If i use 

issueFunction not in portfolioChildrenOf("filter=173068") AND project = NPM, this gives me all of the Tasks not just those under --Parent /Child (173068)

 

How do I get the Tasks for the Epics, with the criteria of "Planned Release" ~ "P-25MR1*" and issuetype in (Initiative) ?

1 answer

1 accepted

0 votes
Answer accepted
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.
February 5, 2025

Hello @Melissa C 

It looks like you are using ScriptRunner functionality by using issueFunction in portfolioChildrenOf(). Is that correct?

If so, per the documentation:

 

portfolioChildrenOf(Subquery) finds all children in a portfolio/roadmap hierarchy. This function does not bridge the gap from Epic to Story, so, with the above hierarchy, it only finds initiatives and epics that have a parent with the status of 'To Do.'

 

issueFunction in portfolioChildrenOf("Planned Release" ~ "P-25MR1" and issuetype in (Initiative))')

 

...will give you all the Epics of the specified Initiatives. Adding AND project=XYZ will limit the results to Epics in project XYZ.

 

To get the child issues of those Epics you need to use issuesInEpics() referencing the filter you used to get the Epics.

 

https://docs.adaptavist.com/sr4js/latest/features/jql-functions/included-jql-functions/issue-links#issuesinepics

 

filter=173068 OR (issuefunction in issuesInEpics("filter=173068")

 

The first half gives you the Epics, the second half gives you the Epics' children.

Melissa C
Contributor
February 5, 2025

Thank you!! @Trudy Claspill 

I had   issueFunction in issuesInEpics('filter=173068'), but yours is better since I get both Epic and Tasks!

For content - We use initiatives as the Big Projects, Epics for those things that need to be done to complete the project.  Each team has their own Epic example, Development, QA, Etc.  Tasks are the thing that need to be done before an Epic is completed.

For anyone looking at this thread in the future - I was able to get 

I'm able to get:
--Parents/Grandparents
"Planned Release" ~ "P-25MR1*" and issuetype in (Initiative) -->(Saved as Filter=173059)

--Parent/Child
issueFunction in portfolioChildrenOf('"Planned Release" ~ "P-25MR1" and issuetype in (Initiative))') AND project = XYZ --> (Saved as Filter=173068)

--Child/grandchildren
filter=173068 OR (issuefunction in issuesInEpics("filter=173068") --- Gives both Parent and Child

--Child
issueFunction in issuesInEpics('filter=173068')

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.
February 5, 2025

Glad to help!

I didn't see issuesInEpics in your original post. Was that something you had tried but didn't include in your post?

Melissa C
Contributor
February 5, 2025

I got it after I posted! 
I posted and kept trying different solutions 

 

Suggest an answer

Log in or Sign up to answer