Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Hi, which JQL to get all issues EXEPT epics with certain Label (lets say label "A") and child issue

Hi, I`m trying to get all issues EXEPT epics with certain Label (lets say label "A") and child issues of that epics, but those issues might not have this label "A". Thank you

3 answers

2 accepted

3 votes
Answer accepted
Mark Segall Community Leader Aug 19, 2022

Hi @Nataliia_Kasatkina - Unfortunately, this is not something that can be handled with native JQL.  You'll need a 3rd party app like ScriptRunner or JQL Extensions to perform a query where you're trying to retrieve children of a subset of epics.

Like Mark Segall likes this
0 votes
Answer accepted

Hi @Nataliia_Kasatkina,

I am Marlene from codefortynine.

Another option would be Dynamic Custom Fields for Jira.

With our app you can create computed custom fields, which derive field values from existing issue data. 

For your use case you could create a custom field which displays the labels of the parent issue (e.g. the Epic). 

dynamic-custom-fields-jira_parent-label.pngThe Jira expression for this custom field would be the following:

issue.parent ? issue.parent.labels : (issue.epic ? issue.epic.labels : [])

 Once you've added this custom field to your issue, you could filter for "all issues EXEPT epics with certain Label and child issues of that epics, but those issues might not have this label" using JQL. 

Hi @Nataliia_Kasatkina

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 

You can use this query to return all issues EXEPT epics with a certain Label (let’s say label "A") and child issues of that epics.

issue in epicsOfChildrenInQuery("") and labels = A OR issue in childrenOfEpicsInQuery("labels = A”)

 After this, you can save the query as s filter like this:

Screen Shot 2022-08-22 at 07.50.27.png 

And then, run it in Jira’s JQL using:

filter!= filterName

Check out the documentation for more examples.

If you have any other questions, please contact our support. We’ll be happy to help you!
Best regards,

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira Software

An update on Jira Software customer feedback – June 2022

Hello Atlassian Community! Feedback from customers like you has helped us shape and improve Jira Software. As Head of Product, Jira Software, I wanted to take this opportunity to share an update on...

4,994 views 18 31
Read article

Atlassian Community Events