Forums

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

Anyone know of a doc/article reference for the "filter" jql function for jql syntax reference

Jack Brickey
Community Champion
October 22, 2020

I have played with this a bit on occasion but feel like I could benefit from some documentation and even examples of usage. I have been poking around Atlassian docs and Community and even Google but haven't turned up anything useful. It is sort of hard to come up w/ the right search terms for this w/o getting overwhelmed by "nope that's not it" references.

3 answers

1 accepted

2 votes
Answer accepted
Matt Doar
Community Champion
October 22, 2020

I see the documentation at https://support.atlassian.com/jira-software-cloud/docs/advanced-search-reference-jql-fields#Advancedsearching-fieldsreference-filter

I've seen subfilters used when you want to have a list of people in different filters and only make changes in one place. For example

Your first filter with example names in a  team:

assignee in (jsmith, bsmith, jko)

Save the filter with a name such as "MyTeamNameHereMembers"

In all the filters where you want to use that set of people:

filter = "MyTeamNameHereMembers" and project in (PKEY1, PKEY2, PKEY3)
Matt Doar
Community Champion
October 22, 2020

I've also seen it used in ScriptRunner JQL to find all the issues and sub-issues in an Epic in the past. Nested filters can have performance problems, and if uses as agile board filters Jira may not be able to work out which projects you need to have Manage Sprint permissions for

Like # people like this
Jack Brickey
Community Champion
October 25, 2020

Thanks to all for your input and digging into the docs!

0 votes
Lars Mählmann
Community Champion
October 22, 2020

Hi,

not a perfect answer but maybe it helps a bit. I found a JQL Cheat Sheet:

* https://3kllhk1ibq34qk6sp3bhtox1-wpengine.netdna-ssl.com/wp-content/uploads/2017/12/atlassian-jql-cheat-sheet-2.pdf

0 votes
Dave Liao
Community Champion
October 22, 2020

@Jack Brickey - hey Jack! Can you elaborate a little more on what you're looking for?

(I can see how this would be fiddly to search for... )

Jack Brickey
Community Champion
October 22, 2020

i'm struggling w/ how to make it more clear other than I want some documentation on how one might leverage the JQL "filter" function. The challenge here I guess is that I don't have a scenario I'm trying to solve but rather just trying to see if there is any reference that might educate me to benefit in the future.

one obvious UC is to create a 'base' filter and then reference it for different filters so as to save you time in creating complex lengthy filters, e.g. complex date searches, etc.

Like Dave Liao likes this
Dave Liao
Community Champion
October 22, 2020

@Matt Doar - listed the official doc on "filter"! Props to him. :)

Reading it, and I learned something today: never thought about excluding filter results using "NOT IN" / != ... I'm excited to come up with a practical use for that.

Like # people like this
Jack Brickey
Community Champion
October 22, 2020

yes this is exactly the unique use cases i'm think about. 

Like Dave Liao likes this
Esther Strom
Community Champion
October 22, 2020

I'm finding more and more ways the function can be useful. One way we use it is to allow a saved ScriptRunner enhanced search to be used in boards' quick filters and for doing swimlanes by JQL, since the custom JQL functions implemented by ScriptRunner can't be used directly in those cases.

Like Dave Liao likes this

Suggest an answer

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

Atlassian Community Events