Show Menu

JQL (JIRA Query Language) Cheat Sheet by

Cheatsheet for JIRA's Query Language
language     jira     query     jql

Constr­ucting JQL Queries

JIRA 1 Example Clause
project = TEST
JIRA 2 Example Clause
project = TEST AND assignee in (curre­ntu­ser())
Breakdown
Field
project
Operator
=
Value
TEST
Values & Functions
TEST AND assignee = curren­tuser()
A simple query in JQL (also known as a 'clause') consists of a field, followed by an operator, followed by one or more values or functions. For example:

Scoping and sorting

Scoping
Focusing your query so it pulls the right amount of data so the user sees only the inform­ation relevant to the current item at hand.
Sorting
Ordering your data such that the most critical set of data is listed first.
Part of a good query is knowing how to get data out of JIRA. The other part is knowing how to engage your team and your customers with the result. Let's start with two concepts that are critical to effective data presen­tation.

Fields

Assignee
Epic Link
Resolved
Affected version
Filter
Sprint
Attach­ments
Fix version
Status
Comment
Issue key
Summary
Component
Labels
Text
Created
Last viewed
Time spent
Creator
Priority
Voter
Descri­ption
Project
Watcher
Due
Reporter
custom field
A field in JQL is a word that represents a Jira field (or a custom field that has already been defined in Jira).

Operators

=
!=
>
<
>=
<=
~
!~
in
not in
is
is not
was
was not
was in
was not in
changed
An operator in JQL is one or more symbols or words that compare the value of a field on its left with one or more values (or functions) on its right, such that only true results are retrieved by the clause. Some operators may use the NOT keyword.
 

Functions

Time
People
Issue
startO­fDa­y/W­eek­/Mo­nth­/Year
curren­tLo­gin()
issueH­ist­ory()
endOfD­ay/­Wee­k/M­ont­h/Year
curren­tUser()
openSp­rints()
lastLo­gin()
 
watche­dIs­sues()
now()
 
myAppr­oval()
  
myPend­ing()
A function in JQL appears as a word followed by parent­heses, which may contain one or more explicit values or Jira fields.

A function performs a calcul­ation on either specific Jira data or the function's content in parent­heses, such that only true results are retrieved by the function, and then again by the clause in which the function is used.

Reserved characters & words

space (" ")
/
a, and, are, as, at,
+
%
be, but, by, for, if,
.
^
in, into, is, it, no,
,
$
not, of, on, or, s,
;
#
such, t, that, the, their,
?
@
then, there, these, they,
|
[
this, to, was, will, with
*
]
When using these common characters or words in queries, you need to:

1. Surround them with quote-­marks. You can use either single quote-­marks (') or double quote-­marks (") eg. text ~ "­enc­odi­ng"

2. If you are searching a text eld and the character is on the list of reserved
characters or words, precede them with two backsl­ashes \\

Term modifiers

Wildcard search
Fuzzy search
Replace single character with ?
e.g. te?t
Replace multiple characters with
e.g. win
Add ~ to the end of a single term
e.g. roam~
Prox­imity search
Boost term
Add ~ and a number to the end of a phrase in quotes
e.g. text ~ '"At­lassian jira"~10'
Add with a boost factor (a number) to the end of a search term e.g. atlass­ian4 jira

Word stemming

Field
Add ~ to the beginning of a single term
e.g. ~customize

Download the JQL (JIRA Query Language) Cheat Sheet

2 Pages
//media.cheatography.com/storage/thumb/justinbyrne_jql-jira-query-language.750.jpg

PDF (recommended)

Alternative Downloads

Share This Cheat Sheet!

 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          French Cheat Sheet