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

Nataliia.Kasatkina August 19, 2022

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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 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.

Nataliia.Kasatkina August 19, 2022

Hi @Mark Segall thank you

Like Mark Segall likes this
0 votes
Answer accepted
Marlene Kegel - codefortynine
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
September 14, 2022

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. 

Nataliia.Kasatkina September 14, 2022

Thank you!

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.
August 22, 2022

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,
Maurício

Nataliia.Kasatkina August 26, 2022

Thank you!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events