The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
  • Community
  • Q&A
  • Jira
  • Questions
  • Hi, which JQL to get all issues EXEPT epics with certain Label (lets say label "A") and child issue

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

3 votes
Answer accepted
Mark Segall
Community Champion
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
Atlassian Partner
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 Champions.
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!

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events