Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

In JQL, how do I query for Epics with no child Issue Links?

I have a query where issuetype = Epic (and other stuff, like labels), but want to see only those Epics that have no Stories ("Issues in Epic") yet linked.  How do I specify that?

I only see "Epic Link" in the list of fields to query on, which is not the correct direction - it would work for Stories that lack a parent Epic.  What I want to find is the other way around.

This is my query (with some names changed for security).  Highlighted is the part that needs the correct field name (or completely new approach?) 

(project in "My Project Name") and ((issuetype in (story, bug)) or (issuetype = epic and "epic link" is empty)) and status != Cancelled

Should also mention that I am grouping by epic.  This gives me epics and child stories under them... but I want to pick up the epics that don't already have stories too.

Thanks!

2 answers

1 accepted

1 vote
Answer accepted

Hi @will_cummings,

Disappointing as it may seem, there is no JQL search available to retrieve these data in vanilla Jira. There are marketplace apps available that may help you extend search capabilities, and if you often depend on issue links and other parent-child related searches it my well be worth looking into those. Here is a link to the marketplace that may get you started.

Depending on why you would want to find these Epics, you might use the roadmap to as a workaround to simply identify those Epics. An Epic without child issues is displayed there without a progress bar below it and it also doesn't have this > indicator that allows you to expand:

Screenshot 2020-12-22 at 23.42.56.png

in the above example, AG-2 has child issues while AG-4 hasn't.

The roadmap is available in next gen projects and can be activated for classic projects as well from Board settings > Roadmap (beta)

Ah!  OK, thanks Walter.  I may have to go the plug-in route, if such a plug-in exists.

This is what I am trying to ultimately achieve (see screenshot).  Without the "OR" clause, I get only the top three (because they each have child Stories).  With the "OR" clause, I get the original 3 repeated, plus the two that don't yet have children.  Want the top three and the bottom two - preferably all at the same level, so that when I expand them all, I get the Epic/Story hierarchy shown properly.

2020-12-22_16-04-42.jpg

Hi @Walter Buggenhout _ACA IT_ - I found a possible plug-in candidate, and have applied to the powers that be to determine whether we can get it.  Thanks for the tips and the link to the Marketplace.  Much appreciated.

Hi @will_cummings,

Thanks for sharing that screenshot from Structure. You didn't mention you were trying to build a hierarchy there. In that case, it may be worth looking into the documentation of how you can build your hierarchy with Insert and Extend generators: it is not necessary to build your entire structure from a single query, but rather add issues level by level.

You may obviously still run into the same JQL issue to exclude Epics without child issues, but you'll have more control over your structure hierarchy.

Have a look at the documentation of Structure Automation. And more specifically:

@Walter Buggenhout _ACA IT_  - Thank you Walter.

It turns out that I cannot install plugins beyond what has been officially blessed by my company.  Thankfully, they have the ScriptRunner plugin, and  someone much more familiar than I suggested a solution for me, which will suit my present needs.  It looks like this:

project ="Prometheus CPD-DMS" and (issuetype in (Story, Bug) OR (issuetype = epic AND issueFunction not in hasLinkType("Epic-Story Link"))) and status != Cancelled order by sprint, key

Thanks again for your help!

I'm no expert on this, but here's a related post I found: https://community.atlassian.com/t5/Jira-Software-questions/JIRA-Need-count-of-stories-under-an-epic/qaq-p/961579. The idea that led me to that page was that there might be a variable for the number of issues in an epic, in which case you could just look for epics with 0 issues. There doesn't seem to be anything easily accessible, though; everything I saw suggested involves scripting or similar.

Perhaps something has been developed in this area recently, but from what I can see, there are solutions, just nothing especially simple.

Thanks Joshua.  I will explore that option.  I've only been exposed to Jira for two weeks now, and am trying to come up to speed rapidly - along with my "normal" job of requirements analysis on a software project.

I'm thinking that something scripted will not be allowed - unless I can get "the powers that be" to agree.  But, not sure.  Maybe someone else will have an additional answer.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
Community showcase
Posted in Jira Software

Presenting the "Best of 2020" Jira Software roundup!

Catch up with Atlassian Product Managers in our 2020 Demo Den round-up! From Advanced Roadmaps to Code in Jira to Next-Gen Workflows, check out the videos below to help up-level your work in the new ...

7,139 views 8 28
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you