Search for EPICS with no stories

TEMPVIMAE
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 15, 2021

Can I write a JQL for getting all the EPICS in the project that do not have stories under them.

4 answers

1 accepted

3 votes
Answer accepted
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.
June 15, 2021

Not without an add-on. For example Scriptrunner provides the following option…

Issuetype = epic  and issuefunction not in haslinktype (“epic-story link”)

Robin Surland December 17, 2021

That doesn't work even with ScriptRunner. 

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.
December 17, 2021

This doesn’t work?

issuetype = Epic and issueFunction not in hasLinkType("Epic-Story Link")
Like David Kollm likes this
Robin Surland December 20, 2021

It works today, I'm not sure what my issue was last week. 

Doug Harriman
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 4, 2024

I am trying to find all the Epics I have in the current PI, that are assigned to my team project, and do not have any stories/spikes/enablers linked to it. 

NOTE:  Our Epics are not in the same project as the team project where the stories/spikes/enablers resides.  This is what I have.  The first 2 parts work.  I tried to add the third part and cannot get it to work.

"Program Increment[Short text]" ~ PI## AND issueFunction in epicsOf(" project in (My_Project) ") AND issueFunction not in hasLinkType("Epic-Story Link")   

The error is that issueFunction does not exist. But it does because the second part of the script works and I am in ScriptRunner.

0 votes
Maria Lopez Alurralde
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 11, 2024

is there a way to do this without an extension?

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 12, 2024

Hi @Maria Lopez Alurralde 

Yes, and the how-to depends upon how frequently you need to do this, how many epics you have, etc.

Need this one time:

  • export all of your issues to a spreadsheet, and perform the check there using spreadsheet functions / matching

Need this often, and do not have JQL extensions:

  • using automation rules and a custom field (or label), count the issues assigned to an epic, and add that count to the epic.  That field (or label) could then be checked using out-of-the-box JQL.  Without knowing your specific Jira version or license level, please note this could consume your service execution limits for rules.
  • manual check: using JQL and a dashboard gadget to report on the children of epics, note the ones with a parent, and the remainder are the ones you want

Kind regards,
Bill

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.
June 16, 2021

Vanilla JQL doesn't support it. You can export your issues to spreadsheet and process the data there. Obviously it only works for one off jobs.

You can find such epics with our app JQL Search Extensions.

If you install it you'll be able to perform this search:

issuesInEpicCount = 0

 I hope this helps!

Kimberly Luttenbacher January 4, 2022

We have this addon, we've tried the search, and it returns a single epic.  However, we have several epics in our project that have no issues in them, that are not returned by this query.
From what I can see, the epic the query finds doesn't have any links to other epics, but the epics we have with no stories that the query does NOT find are linked to at least one other epic. 
So I'm guessing but not certain that maybe the addon is counting "links" as "issues in the epic" even though the links are to other epics that relate to ours or that share dependencies.

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.
January 25, 2022

Hi @Kimberly Luttenbacher , please create a support request. It's the quickest way to get help with JQL Search Extensions. Thanks!

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 15, 2021

Hi @TEMPVIMAE  -- Welcome to the Atlassian Community!

How often do you need to do this, and do you have funds to purchase marketplace addons?

  • When you need this once: consider exporting your issues to a spreadsheet and perform the comparison there
  • When you need this often and have funds for addons: consider marketplace addons like @Jack Brickey suggests
  • When you need this often and do not have funds: consider using a scheduled automation rule to either count the children and email you, or add the count to a custom field in the epic and then you can report on it later with JQL

Best regards,

Bill

Suggest an answer

Log in or Sign up to answer