Forums

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

issuesinEpics how do I return only the open issues in the open epics?

Bea Tea
Contributor
July 16, 2022

This article is a bit confusing as this IS what I want to do.

https://www.adaptavist.com/blog/top-10-most-commonly-used-jira-query-language-functions#epicsOf

 

Example: issueFunction in issuesInEpics ("project=JRA and status = 'in progress'")

Example for ‘issuesinEpics’

As a project manager, you might want to look at open epics and then at issues in specific statuses to see how many open, in progress, or other issues’ statues are in the current project. Specifically, you may want to see issues in the open epics that are also open, so you can gauge the work your team has yet to start. 

For version 1.0, I want all open issues in open Epics.

The result I get is all issues in the open epics regardless of fix version, including the closed tickets.

1 answer

1 accepted

0 votes
Answer accepted
Walter Buggenhout
Community Champion
July 17, 2022

Hi @Bea Tea,

The article may indeed be a little confusing. The issuesInEpics() function basically makes sure that the result of whatever you specify as the subquery will only return issues linked to open Epics. In other words: it will not return any issues linked to closed Epics.

If you then would like to see all open issues (regardless of status) linked to those epics, your JQL would look like this:

issueFunction in issuesInEpics("Project = JRA AND resolution = Unresolved")

 Hope this helps!

Mathias Richter
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 17, 2022

Hi @Bea Tea , hi @Walter Buggenhout 

the trick here is, that you have to look for open issues twice. Once for open Epics and once for open Issues in those Epics. The identification of open Epics happens in the sub-query of the function (within the brackets) and the second one outside of the brackets. As you're using "issuesInEpics", the sub-query defines the list of Epics, the function shall use to look for linked issues.

So to find all issues in all open Epics, you would use:

issueFunction in issuesInEpics ("project=JRA and statusCategory = 'in progress'")

To find all open issues in all open Epics, you would use:

issueFunction in issuesInEpics ("project=JRA and status = 'in progress'") AND statusCategory = "In Progress"

Instead of status I used the field statusCategory, as this includes all "blue" statuses, not just the one call "In Progress". (refer to: https://community.atlassian.com/t5/Jira-questions/How-to-search-for-status-types-e-g-yellow-blue-green-quot-To-Do/qaq-p/589411)

Now it's important to understand, how you define "open Epics" and "open Issues". This could be done by StatusCategory, Status, or (As @Walter Buggenhout suggested) by Resolution. This is now up to you and you can use, whatever field you want, in one of the above queries.

PS: instead of only "In Progress" issues, you could also include Backlog (ToDo) items in the query by using, e.g., StatusCategory in ("ToDo","In Progress").

Hope that helps.

Regards
Mathias

Bea Tea
Contributor
July 18, 2022

@Mathias Richter thank you so much. This solves my issue!!!!

Bobby Williams June 26, 2024

issueFunction 

I get an error saying that it isn't found.

Suggest an answer

Log in or Sign up to answer