Trying to find all parents (portfolio epics) for children (epics)

kenneth.gomes March 12, 2024

I am trying to write a query to find all children epics for a given portfolio epic.

Criteria;

Parent

  • Project = UIP
  • Status = Funnel

Children

  • project = any
  • Status = Inprogress 

I am stuck at this query as my results keep giving me 0 results even though the inner query works as intended.

I started with finding all the children where the project = UIP and the child status is in Inprogress and the issue type is not in Story, Task, Sub-task, Bug. From there I tried to highlight all the parents so I can start narrowing down my results.

issueFunction in parentsOf("issueFunction in childrenOf('project = UIP and status = Inprogress' and issueType not in (Story, Task, Sub-task, Bug))")

Any direction will be helpful

 

2 answers

1 accepted

1 vote
Answer accepted
Kate Kabir
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 13, 2024

Hi @kenneth.gomes 

I hope you are doing great.

You cannot have an IssueFunction nested into another issueFunction,  then you will need  to save the sub-filter with this query and then refer it in the main issueFunction.

Create the JQL search used by your board filter or quick filter and reference the saved filter using the syntax shown below which will return the results of your filter using the JQL functions provided by ScriptRunner.

filter = "<NameOfFilterhere>"

I have a parentOf JQL query and call another childrenOf saved filter.

Potentially, you can use the below JQL query as an example/guide:

issueFunction in parentsOf(Project = STRAW AND issueType = Epic) AND Status = Done AND filter = "childrenOf"

I have another saved filter for the childrenOf JQL query name "childrenOf".

I hope this helps. :)

Kind Regards

Kate

kenneth.gomes March 13, 2024

Thank you Kate, that solution works :)

Kenneth

0 votes
Kalyan Sattaluri
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 12, 2024

Hello @kenneth.gomes 

In our firm, becuase of how our Portfolio Epics vs Normal Epics are set up in Jira, below query gives us the data:

 

issueFunction in portfolioChildrenOf("Project = UIP and status = Funnel")
AND status = "Inprogress"
And issuetype not in (Story, Task, Sub-task, Bug)
Please let me know if its the same for you as well.
kenneth.gomes March 12, 2024

Hi Kalyan,

Thank you for your suggestion but when I tried using your query with ScriptRunner Enhanced Search and I keep running into the error "Function 'portfolioChildrenOf' does not exist"

I might have to find an alternative to the above function

Kenneth

Kalyan Sattaluri
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 12, 2024

Hello @kenneth.gomes 

Sorry about that, I think there is a difference between data center and cloud when it comes to script runner functions for portfolio epics. Hopefully others who are familiar can share more details.

kenneth.gomes March 13, 2024

Hi Kalyan,

I am thankful that you tried to help :)

Kenneth

Like Kalyan Sattaluri likes this

Suggest an answer

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

Atlassian Community Events