Writing complex JQL - fetching all issues that have child issues in another project

harshita.sharan August 14, 2022

Context: We have a project that only houses custom Issue type "Initiative" which is parent of Epic Issue type. The hierarchical issue organization example is:

  • Initiative(belongs in JIRA Project A) - issue Key INIT-1
    • Epic1 (belongs in Project B) - issue Key CAT-1
    • Epic2 (belongs in Project B) - issue Key CAT-2
    • Epic3 (belongs in ProjectC) - issue Key DOG-1
    • Epic4 (belongs in project B) - issue Key CAT-3

I would like to know if there is a way to write a query which will bring up all initiatives from project A which has child issues in project B.

Is there a way to do this?

1 answer

0 votes
Mathias Richter
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 15, 2022

Hi @harshita.sharan ,

assuming you're using the Parent Link field provided by Advanced Roadmaps, the following JQL function should do the magic:

https://docs.adaptavist.com/sr4js/latest/features/jql-functions/included-jql-functions/portfolio

The following JQL should show all the 4 mentioned Epics:

issueFunction in portfolioChildrenOf("key = INIT-1")
Mathias Richter
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 15, 2022

In case you use ScriptRunner.

Suggest an answer

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

Atlassian Community Events