Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a query to show all linked issues to child issues of an epic to an objective for Portfolio

Jonathan Parsons November 11, 2022

Hi 

In Jira portfolio I use the following script in a filter so that a plan returns all child issues of an objective [and the objective itself too]. 

Key = "PRCP-1" OR Issue in portfolioChildIssuesOf("PRCP-1")

This returns the objective and all epics under that plus all child stories under each epic (and if there were any sub-tasks to each story then these too) - which is good.

However, I would like a query to drill down further such that I would like to include in the query

for each child story under an epic [which is part of PRCP-1]

     if exists, return linked stories linked that child story  

end for

I use Jira Cloud so don't believe that I can perform nested queries in JQL. Furthermore I don't have ScriptRunner function addon either.

Any assistance would be greatly appreciated please. Thank you.

  

 

1 answer

0 votes
Mark Segall
Community Champion
November 11, 2022

Hi @Jonathan Parsons - You are correct that you won't be able to get something like that natively.  The static nature of queries like issue in * make it impossible.

One workaround could be to use automation so that every time an issue is linked on a child, that issue is also linked to the objective.  You could maybe use a custom link type like "Objective Relation" so it can be filtered out when doing other stuff.  Then your query would look something like this:

Key = "PRCP-1" OR Issue in portfolioChildIssuesOf("PRCP-1") OR issueObjectiveRelation = PRCP-1

Automation would look something like this... On link, check both sides of the link to see if they are already part of the tree.  If not, link the issue to the objective:

  • TRIGGER: Issue Linked
  • BRANCH (Current Issue)
    • CONDITION (JQL)
      • issue not in portfolioChildIssuesOf(PRCP-1)
    • ACTION: Link Issue (PRCP-1)
  • BRANCH (Destination Issue)
    • CONDITION (JQL)
      • issue not in portfolioChildIssuesOf(PRCP-1)
    • ACTION: Link issue (PRCP-1)

Suggest an answer

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

Atlassian Community Events