Forums

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

I am looking for a JQL query where I find all stories that are linked to an Epic with a label HW.

Eric Roetenberg
Contributor
January 24, 2023

Help!!
I am looking for a JQL query where I find all stories that are linked to an Epic with a label HW.
in our example, this involves multiple stories and multiple Epic

 

Grtz.  Eric

5 answers

0 votes
mauricio.groth
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 24, 2023

Hi @Eric Roetenberg

I’m Maurício, a support engineer at Digital Toucan and I’m here to help you.

Unfortunately, using JQL of Jira, you’ll not be able to do it variable.

In the app where my team works, JQL Search Extensions for Jira, you can use this query to find all your stories that are linked to an Epic with a label HW

issue in linkedIssuesOfQuery("type = epic and labels = HW") and type = Story

Please contact our support if you have any other questions about this query. 

We’ll be happy to help you!
Best regards,
Maurício

0 votes
Hannes Obweger - JXL for Jira
Atlassian Partner
January 24, 2023

Hi @Eric Roetenberg

unfortunately, "plain" JQL isn't too great with hierarchies, so to the best of my knowledge, you'll need extra tooling to solve your use case.

A few directions forward:

  • If you're on Jira Premium, something like this may be possible in Advanced Roadmaps, since it has great support for issue hierarchies. I haven't tried this myself, though.
  • You may be able to use Jira Automation to "propagate" the label from the epic down to its stories. Obviously, this will add a certain amount of complexity to your setup.
  • Lastly, there are apps from the Atlassian Marketplace that can help with that. On the one hand, there's a number of apps that extend JQL by additional functions, including hierarchy-related functions. JQL Search Extensions and Scriptrunner are very popular, but there may be others.
  • Alternatively, you could try one of the more hierarchy-focused apps from the Atlassian Marketplace. These apps usually have their own ways of figuring out parent/child relationships between issues, and provide more powerful ways to define and navigate through issue hierarchies. I myself work on such an app, in which your use case would be easy to solve; I'll provide more details below.

Hope this helps,

Best,

Hannes

Hannes Obweger - JXL for Jira
Atlassian Partner
January 24, 2023

Just to expand on the latter, this is how this would look in the app that my team is working on, JXL for Jira; TLDR: You can simply load your relevant issues into a sheet, enable the default issue hierarchy (that's just one click), and then filter down to the epics that you care about:

epics-by-label.gif

Once you've narrowed down your list of issues, you can work on these directly in JXL (much like you'd do in e.g. Excel or Google Sheets), trigger various operations in Jira, or export them for further processing.

As said above, there are other apps that may help with that - so perhaps try a few and see which one works best for you!

Any questions just let me know,

Best,

Hannes

0 votes
Ankit Srivastava
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 24, 2023

Hi @Eric Roetenberg 

Hope you are doing well.

 issuetype = Story AND parentEpic in (Enter the epic key like  Epic key1, Epic key2) AND labels = "HW"

 
Hope this will help.

Thanks

Eric Roetenberg
Contributor
January 24, 2023

Hi Ankit,

I just want to see the stories that fall under an EPIC with a label HW without naming the EPIC link because it is variable

 

Grtz,  Eric

Ankit Srivastava
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 24, 2023

Hi @Eric Roetenberg ,

Please check the below link hope this will help if you have script runner:

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

 

Hope this will help.

Thanks

0 votes
Guruprasad Shenoy
Community Champion
January 24, 2023

Hi @Eric Roetenberg 

 

issuetype = "story" AND "Epic Name" is not empty AND labels = "HW"

0 votes
Gokaraju gopi
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 24, 2023
issuetype = Story AND "Epic Link" = <etner epic name here> AND labels = "HW"

replace <etner epic name here> with epic name

Eric Roetenberg
Contributor
January 24, 2023

Hi Gopi,

 

I just want to see the stories that fall under an EPIC with a label HW without naming the EPIC link because it is variable

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events