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
4,360,193
Community Members
 
Community Events
168
Community Groups

Search Issues by Epic with a certain Label

Edited

Hi there

Is there a way to write a a baisc jql-filter on issues that also checks a property of their epic? Or could it  be done via the script-runner-plugin?

Background story: We often log work on epics of issues in the current sprint, if the work cannot directly be associated to a task. Like sprint planning etc.
But only on epics that allow the logging of work (i.e. do not contain label=logWorkNotAllowed)

So either a) start with the actual issues (showing epic-link-column in results)
Filter issues by a certain sprint (sprint=XYZ) then filter by epics which do not have the label "logWorkNotAllowed"
or b) list epics directly
Filter issues by "issueType = Epic AND labels != logWorkNotAllowed" then select only those which have a connected issue in sprint=XYZ

In Datebase-Terms we need to Join the issues with their epics, and apply filters on both.
Is that possible?

Thanks for your help!
Kind Regards Andy

 

2 answers

1 accepted

3 votes
Answer accepted

Hi Andy,

Sadly you cannot achieve the desired search using standard features on Jira, you must go for a third-party app instead. Using i.e. JQL Booster Pack you can type the following:

 

a) Start with the actual issues (showing epic-link-column in results)
Filter issues by a certain sprint (sprint=XYZ) then filter by epics which do not have the label "logWorkNotAllowed"

Sprint = XYZ AND issue NOT IN issuesInEpics(' type = Epic AND labels = logWorkNotAllowed ')

>> This Will return the issues but not the Epics

 

b) list epics directly
Filter issues by "issueType = Epic AND labels != logWorkNotAllowed" then select only those which have a connected issue in sprint=XYZ

type = Epic AND (labels != logWorkNotAllowed OR labels IS EMPTY) AND issue IN epicsOf(' Sprint = XYZ ')

>> This will return the Epics but not related issues

 

You can easyly save above queries as filters, give them a meaningful name, and then combine both results by tying:

filter = "You named filter for Epics" OR filter = "You named filter for issues"

 

(*) Note that this is just an exaple, you must tune above queries to fit your needs

Using this app you can also query other issues relations, check:

 

References:

 

Hope this helps you to create awesome queries <3

Kind regards

Thats exactly the information I needed :)
I'll check it out!

Thank you very much

You're welcome

Like Andy Zimmermann likes this
1 vote
Vikrant Yadav Community Leader Apr 09, 2020

@Andy Zimmermann  i think you are using wrong label field , try to "labels" instead of label

 

try this :-  issuetype = Epic AND labels != CoreApp

oh thats actually just a typo. Fixed it. thanks for the catch!

but the main issue still stands :)

Vikrant Yadav Community Leader Apr 09, 2020

@Andy Zimmermann You can create Sprint custom field and filter issues via JQL.

I don't understand how that would help.

What I need, is this kind of issue filter query:
"sprint = XYZ AND labelsOfEpic != logWorkNotAllowed"But ofc there is no such thing as "labelsOfEpic", or is there a way to filter by the issues associated epic properties additonally to filtering the issue property (sprint)?

Or alternativly: the epic-filter
"issueType = Epic AND labels != logWorkNotAllowed AND issuesConnectedToEpicHaveSprint = XYZ", where again I could not find any way to query the associated issues of an epic (i.e. the fake label: issuesConnectedToEpicHaveSprint )

How to search for the item with one of its labels as "SYNC"? I mean, there are several labels added to one item, I would like to search it out with one of its labels. At this time, "=" is not work.

Suggest an answer

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

Online AMA this week: Your project management questions answered by Jira Design Lead James Rotanson

We know that great teams require amazing project management chops. It's no surprise that great teams who use Jira have strong project managers, effective workflows, and secrets that bring planning ...

186 views 1 6
Read article

Atlassian Community Events