JQL HELP : 2 projects linked by initiative to Epic
Asked by Exalya:

Hi All

I please need your help :)

I have 2 projects :

* Project A : has all the initiatives
* Project B : has all the Epics linked to the initiative of Project B

I need a JQL query so i can list all items (Epic, story, sub-task) in **project B** for which the Epics are linked to the initiatives located in **Project A**.

Please help:)))

![3B22FF61-7538-4504-875C-2F468889DB60.png](/t5/image/serverpage/image-id/133066iDA85E327B82619C2/image-size/large?v=v2&px=999 "3B22FF61-7538-4504-875C-2F468889DB60.png")

PS : I don't have any pluggin... and I'm not allowed to put one in my work station., I need a basic JQL query with no fancy tools ?


Answers:
author: Dave
body: Hey [@Martin Bayer _MoroSystems_ s_r_o__](/t5/user/viewprofilepage/user-id/527698) ,

You could well be right.... however, because [@Exalya](/t5/user/viewprofilepage/user-id/4290701) has mentioned that they are using Initiatives and has posted in the Advanced Roadmaps space then I had assumed that they have Advanced Roadmaps (either as an app on server, bundled with Data Center or on Cloud) but this might not be the case and you're right that we don't know this for certain.

However, assuming [@Exalya](/t5/user/viewprofilepage/user-id/4290701) does have Advanced Roadmaps then my solution should work - especially assuming that she has created Initiatives as a hierarchy level above epic..... hopefully they'll be able to clarify this,

Regards,

Dave


author: Dave
body: Hi [@Exalya](/t5/user/viewprofilepage/user-id/4290701) ,

You can use the "portfolioChildIssuesOf" function, for example you'd write JQL like this:

```
issuekey in portfolioChildIssuesOf(INI-3) AND project = "Project B"
```

Despite the name, this function actually returns all descendants of the issue provided - not just the children.

This particular example just fetches the children of a specific initiative so you might need to have OR conditions if you want to fetch the descendants of multiple initiatives.

However, it is important to note that this is an expensive query to run in terms of computation so can take longer to run than other queries.

I hope this helps!

Regards,

Dave

comments: author: Exalya
body: Hello thank you for the answer ?!!

tjis still doesn't help tho because I want all initiatives not only

```
in portfolioChildIssuesOf(INI-3) 
```

Because this request returns only for one initiative, I want all issues ( in project B) that have a link to all initiatives (in project A).

please help

Thanks in advance ?


author: Dave
body: Unfortunately I don't that there's a simple JQL solution for this [@Exalya](/t5/user/viewprofilepage/user-id/4290701) .... the only thing I can think is that you could create an additional hierarchy level above Initiative and then make it a parent of all the Initiatives in Project A and then use the portfolioChildIssuesOf for that issue. That's definitely a workaround to the problem but it should at least work.

Regards,

Dave


author: Martin Bayer _MoroSystems_ s_r_o__
body: Hi, I'm sorry, you are right, I didn't notice it is for Advanced Roadmaps :(


author: Exalya
body: Exactly!! Yes we do have a SAFe framework .. and projects setup as portfolio.

Does this help ??.   
Thank you so much


Tags: advanced-roadmaps