Justinbyrne - JQL Jira Query Language

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

JQL (JIRA Query Language) Cheat Sheet

by Justin Byrne (justinbyrne) via cheatography.com/26383/cs/14048/

Constr​ucting JQL Queries Fields

JIRA 1 Example Clause project = TEST Assignee Epic Link Resolved

JIRA 2 Example Clause project = TEST AND assignee in Affected version Filter Sprint
(curre​ntu​ser())
Attach​ments Fix version Status
Breakdown
Comment Issue key Summary
Field project
Component Labels Text
Operator =
Created Last viewed Time spent
Value TEST Creator Priority Voter
Values & Functions TEST AND assignee = curren​tuser()
Descri​ption Project Watcher
A simple query in JQL (also known as a 'clause') consists of a field, Due Reporter custom field
followed by an operator, followed by one or more values or functions. For
A field in JQL is a word that represents a Jira field (or a custom field that
example:
has already been defined in Jira).

Scoping and sorting


Operators
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 in not in
part is knowing how to engage your team and your customers with the
is is not
result. Let's start with two concepts that are critical to effective data
presen​tation. 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.

By Justin Byrne (justinbyrne) Published 19th December, 2017. Sponsored by Readability-Score.com


cheatography.com/justinbyrne/ Last updated 19th December, 2017. Measure your website readability!
www.byrne-systems.com Page 1 of 2. https://readability-score.com
JQL (JIRA Query Language) Cheat Sheet
by Justin Byrne (justinbyrne) via cheatography.com/26383/cs/14048/

Functions Term modifiers

Time People Issue Wildcard search Fuzzy search

startO​fDa​y/W​eek​/Mo​nth​/Year curren​tLo​gin() issueH​ist​ory() Replace single character with Add ~ to the end of a single term
? e.g. roam~
endOfD​ay/​Wee​k/M​ont​h/Year curren​tUser() openSp​rints()
e.g. te?t
lastLo​gin() watche​dIs​sues()
Replace multiple characters
now() myAppr​oval() with

myPend​ing() e.g. win

Prox​imity search Boost term


A function in JQL appears as a word followed by parent​heses, which may
contain one or more explicit values or Jira fields. Add ~ and a number to the Add with a boost factor (a number) to the end
end of a phrase in quotes of a search term e.g. atlass​ian 4 jira

A function performs a calcul​ation on either specific Jira data or the e.g. text ~ '"At​lassian jira"~10'
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. Word stemming

Field Add ~ to the beginning of a single term


Reserved characters & words
e.g. ~customize
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 \\

By Justin Byrne (justinbyrne) Published 19th December, 2017. Sponsored by Readability-Score.com


cheatography.com/justinbyrne/ Last updated 19th December, 2017. Measure your website readability!
www.byrne-systems.com Page 2 of 2. https://readability-score.com

You might also like