JIRA Query for all issues that are under a THEME

Lisa Medlin October 24, 2024

Looking for a way to have all issues that are linked or roll u to a theme. 

Theme -> Initiative -> Epic -> Story

Theme is ABC-123

Initiatives vary by team.

2 answers

2 accepted

4 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 24, 2024

Hello @Lisa Medlin 

Welcome to the Atlassian community.

If you are using Jira Cloud, and if the hierarchy you specified has been set up in the Issue Type Hierarchy, and if the issues are connected through that hierarchy as parent/child issues, then you should be able to use the portfolioChildIssueOf() function:

https://support.atlassian.com/jira-software-cloud/docs/search-for-advanced-roadmaps-custom-fields-in-jql/#Child-issues

1 vote
Answer accepted
Robert DaSilva
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 24, 2024

Hi @Lisa Medlin , welcome to the Community!

I do not believe there is a native way in Jira to create a JQL query to return all issues that can rollup into a specific theme. The only way I can think of is if all issues that are related to a theme get "Linked" to that theme.

You can likely do this through some clever automation rules, where each issue type down the chain checks for a pre-existing issue link and duplicates it on itself.

 


There should be an easier way, however, by using ScriptRunner Enhanced Search. There is a JQL Function available called "Children Of", where you supply a given Issue ID, and it will find all children of that issue.

You can read more about that specific feature here: https://docs.adaptavist.com/sr4jc/latest/features/scriptrunner-enhanced-search/jql-functions#childrenof

You can also view the Marketplace Listing here: https://marketplace.atlassian.com/apps/1221331/enhanced-search-for-jira-jql-subqueries?tab=overview&hosting=cloud

Screenshot 2024-10-24 at 1.04.26 PM.png

In this photo example, I'm selecting the Initiative (the top level hierarchy issue type in my demo instance), and it shows both an Epic and Issue that roll up to that Initiative. This should work for your "Theme" as the higher tier, so long as all the issues are properly attributed in a chain.

 

Hope this helps!

Robert

Lisa Medlin October 24, 2024

Thanks for the above, that query doesn't work or it doesn't resolve children of? 

here is my query and it returns issues, however there are initiatives under this theme as well "CT54-90" and it is not pulling epics or stories in 



(issueFunction in issuesInEpics("issueFunction in linkedIssuesOf(\"key in (CIDO-175)\", \"Initiative Includes\")")) AND issuetype in (Epic, Initiative, Story) or (issueFunction in linkedIssuesOf("key= CIDO-175", "Initiative Includes"))

Robert DaSilva
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 24, 2024

Hi @Lisa Medlin , the query I shared above is configured as part of the ScriptRunner Enhanced Search App, and won't work in default JQL fields.

I recommend trying @Trudy Claspill 's solution in this post, as it seems that may be a built-in solution that ends up working for you without the need of an App.

Lisa Medlin October 24, 2024

ok!

 

Suggest an answer

Log in or Sign up to answer