How to I get a list of Epics that have Issues linked to them?

I have a SCRUM Board meant to view the current Sprints across an entire department. The goals are the following.

  • Display all Issues currently in Sprints from the relevant Projects in the Plan tab of the SCRUM Board.
  • Have the Epics on the left side of the board displayed if and only if they have Issues in the active Sprints that are linked to them.

First, I just grabbed the Issues.

project in (many many projects) AND issuetype in standardIssueTypes() AND Sprint in openSprints() ORDER BY Rank

Because Epics aren't embedded in Sprints, this left the Epics out. So I explictly grabbed the Epics.

project in (many many projects) AND (issuetype in standardIssueTypes() OR issuetype = Epic) AND Sprint in openSprints() ORDER BY Rank

This pulled in every single Epic ever made. I then tried to limit the Epic selection, though I knew this was too blunt a tool to deal with the teams' abandoned, unclosed, orphaned, and neglected epics.

project in (many many projects) AND issuetype in standardIssueTypes() AND (Sprint in openSprints() OR (issuetype = Epic AND updated > -6w))  ORDER BY Rank

How do I get only the Epics that are linked to from Issues in the current Sprint?

3 answers

Hey Nik,

Sorry about this quick answer without reading through your entire question. But have you tried

https://confluence.atlassian.com/display/JIRA/Advanced+Searching#AdvancedSearching-Sprint

and https://confluence.atlassian.com/display/JIRA/Advanced+Searching#AdvancedSearching-EpicLink

sprint = "xxxx" and "Epic Link" = Something

Sorry, Bhushan, but this won't fix my issue.

Your solution would only work for pulling Stories (or other Issues linked to Epics). This is not what I want. I want to pull Epics that have (1) have links to them from (2) Issues in the current Sprint. (I can get the "current sprint", but saying…

Sprint = openSprints()

. The challenge remains the Epics.

> How do I get only the Epics that are linked to from Issues in the current Sprint?

If you can use Script Runner, there are functions and some examples that might help here: https://jamieechlin.atlassian.net/wiki/display/GRV/Scripted+JQL+Functions#ScriptedJQLFunctions-MoreComplexExamples
You can filter further on the current sprint ID.

Hi. Script Runner is not available for OnDemand instances, is there anything we can do to get the same result: "get the issues Epic type from other issues that have them in the Epic link"? Thak you.

I have never used it but there is https://marketplace.atlassian.com/plugins/jql-pro. Seems to create a bit of a disconnected experience, although that's no fault of the plugin.

Any update on this?  This would be extremely helpful for us too (using OnDemand) and I can't figure out a way to do this

Hi!

I've tried to find a solution for this myself as well. And I did, at least for my application and intended use. 

You need to have ScriptRunner! 

And in ScriptRunner I used the epicsOf() function like so:

 project = MyProject AND issueFunction in epicsOf('"Backlog" = "MyBacklog" AND Status in ("Ready for Backlog", "In Progress", "Ready For Verification", "Under Verification", "Resolved")')

This enabled me to filter out Epics for my backlog that were relevant to ongoing tasks, thus using the "Epics" window in the backlog properly without any irrelevant Epics.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Feb 13, 2019 in Jira

Make your Atlassian Cloud products more secure: our NEW admin security guide

Hey admins! I’m Dave, Principal Product Manager here at Atlassian working on our cloud platform and security products. Cloud security is a moving target. As you adopt more products, employees consta...

599 views 0 12
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you