JQL to show all Epics of the userstories in an open sprint

Karthik Balasubramanian November 8, 2019

Hi,

I would like to write a JQL query to pull all Epics which are related to the committed user stories in an open sprint.

4 answers

4 votes
Alona Postil August 11, 2022

Hello everyone,

I had the same problem and find the solution using Dashboards. Because it`s difficult to install any addons in my organisation and we haven`t installed Script Runner.

The solution is to use simplest JQL script for issues in the sprint: Sprint in openSprints()

And to set up any dashboard chart using those query and showing Epic Link field.

So I can see all the epics of current sprint along with count of issues of each epic.

Hope, this could be helpful for somebody else.

0 votes
Daniel Turczanski - __JQL Search Extensions
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
October 14, 2021

Hi @Karthik Balasubramanian and @Hari Viswanathan,

As you're on Jira Cloud, the correct answer is to get an app that provides JQL extensions you're looking for.

With standard JQL, you can only get a list of issues and export them to Excel for further processing. This works if you want to do a one-off analysis. If your use case is more dynamic than that, look beyond standard Jira.

Standard JQL doesn't easily allow it, but you can quickly find the results using our professional indexing service JQL Search Extensions

After you install the app, you can simply search:

issue in epicsOfChildrenInQuery("sprint='My sprint'")

Check out the documentation for more examples.

I hope this helps!
Daniel

0 votes
Hari Viswanathan October 4, 2021

@Karthik Balasubramanian : Did you manage to get an answer for this?

0 votes
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 8, 2019

so you want to know the name of the epics that are currently being worked on in the active sprint? try this...

  1. jql --> Sprint = "name of your sprint" and "Epic Link" is not empty
  2. add the Epic Link column

you can also use Sprint in openSprints() to simplify/broaden your search

Karthik Balasubramanian November 14, 2019

Hi Jack,

The above JQL 1 brings out all the issues(Story, improvements, spikes, tasks) which are  linked with some Epic. But I want to bring out the EPICs which are linked to the issues committed in a particular sprint.

Something like SQL below:

Select Epics from issues where sprint = current sprint

Note:  JIRA is hosted internally.

Like Angie Allen likes this
David Almeida February 17, 2020

@Karthik Balasubramanian 

If you have Script Runner installed on your server, you can use this JQL to find the Epics with issues in open sprints:

issueFunction in linkedIssuesOf("Sprint in openSprints()", "has Epic")

 Because we have many projects, I prefix the query with "Project = <key> AND".

 Hope this helps :)

Like # people like this
Angie Allen March 20, 2024

This totally worked.  Thanks, David!

Suggest an answer

Log in or Sign up to answer