How to write a filter to show the Initiative and all epics and stories underneath
Asked by Tim McMonigle:

There are two individual boards/teams working on the same project. I have created a new board that I'd like to just pull out only stories and epics under an Initiative I created that should only display epics and stories underneath that Initiative.

I can pull the Initiative in, but don't know how to structure the filter to pull in epics/stories underneath it.


Answers:
author: Sachin
body: Hello Tim,  

Try this JQL : **issuekey in childIssuesOf("INIT-007")**

The above JQL will return all child issues below INIT-007, and not just the child issues at the epic hierarchy level. This means all the epic ,stories and subtasks will be returned.  

You can read more here - [Searching for issues using Portfolio details](https://confluence.atlassian.com/jiraportfolioserver/searching-for-issues-using-portfolio-details-940678957.html?_ga=2.176643366.261011039.1589305796-2032382553.1589305796)  

Best,  
Sachin.

comments: author: Tim McMonigle
body: That was perfect Sachin. Epics and Stories are now showing. I'm also trying to show these in the Portfolio and the Story Mapping view, and this filter will definitely help.

Thanks!


author: Sachin
body: Tim, glad to hear that! Can you accept my answer so it could help others as well!


author: Tim McMonigle
body: Hi Sachin...hoping to add one more question to my question above, as it worked on one board, but not the other where there are two boards involved.

I have the following filter to pull epics and stories from two different boards, using your filter, where TRA and SPD are the two Projects (different boards) and tra-1655 is the Initiative I'm trying to pull all stories/epics from. It isn't pulling anything back, even though I know there are epics and stories under that initiative on the TRA board.

project in (TRA, SPD) AND issuekey in childIssuesOf("tra-1655") ORDER BY Rank ASC

Any ideas?


author: Sachin
body: Hey Tim, are you using the same filter on two different boards on those two different projects, and can you tell me which board is pulling the issues and which isn't ?


author: Tim McMonigle
body: I am an admin on my board, and that is where I've entered some test stories that should have been displayed with the filter above. Neither board's stories are being displayed on the new third board.


author: Sachin
body: If the above JQL is giving you the results then there shouldn't be any problem of those issues getting pulled onto your board,. However, can you check the "unmapped statuses" from you board --\> configure --\> columns and map them to the correct columns.


author: Tim McMonigle
body: The childIssuesOf worked on one my boards. Where it is not working is when I'm trying to bring issues from two different boards/two different projects into a third board so it only displays work from a single Initiative. Here is my query:

project in (TRA, SPD) AND issuekey in childIssuesOf("tra-1655") ORDER BY Rank ASC

Where TRA and SPD are two separate projects and tra-1655 is the initiative I'm trying to get all epics and stories to display on the third board. It just gives me this message - Unable to find an issue with matching key tra-1655.


author: Tim McMonigle
body: Figured it out...the Initiative ID has to be all caps. When I changed it to TRA-1655, it started to work.

Thanks for all of your help...really appreciate it!


author: christopher.fry@faa.gov
body: [@Tim McMonigle](/t5/user/viewprofilepage/user-id/3917644) Did this filter show in portfolio for you. I used the filter to pull issues from an initiative and it works great in Jira, but when I use the same filter to build a plan in Portfolio for Jira, only the epics show up...no stories (or any standard-issue types).


author: r619090
body: I tried this and it wouldn't work. However, issuekey in **portfolio**ChildIssuesOf worked for me.


author: Singh_ Saddamjit
body: But this hides Initiative in roadmap and show only epics


author: Cristina
body: Hello. I have the same issue: I have created a backlog structure based on Program Epics, Epics, Features, Tasks and Sub-tasks and I need a filter to show all the children of that program epic named TLS-1. I tried **issuekey in childIssuesOf("TLS-1")**but the function childIssuesOf doesn't exist. How else coudl I create this filter?


author: Ashley Mathews
body: Use "**portfolio** ChildIssuesOf" instead of "**childIssuesOf"**


Tags: advanced-roadmaps

atl-gruland

initiative

server