Get started with Jira Service Management for admins
Your first stop for learning how to get started with Jira Service Management.
JQL queries have an order of elements that need to be followed when creating SLAs (service level agreements). There are also functions that are frequently used when creating SLA queries, commonly used operators and certain characters and words that have been reserved in Jira to perform specific functions in the query. Read more about advanced search reference - JQL fields.
In JQL, a query has four basic elements:
Fields are different types of information in the system. For example, a Jira Service Management field may be priority, issue type, date created and project.
Operators are the heart of the query. They relate the field to the value. Common operators include equals (=), not equals (!=) and less than (<).
Values are the actual data in the query. For example, paused() and remaining(“2h”).
Functions are special calculations within Jira to access specific data. For example, issues that have breached SLAs.
You can optionally link a query together using a few select keywords. Keywords are specific words in the language that have special meaning. For example, this may be AND and OR.
A simple query in JQL consists of a field, followed by an operator, followed by one or more values or functions.
For example: project = Test
This query finds all issues in the Test project. It uses the project (field), the equals = (operator), and the Test (value).
The following are functions that are commonly used when writing JQL queries for an SLA:
This filters out issues where the last SLA cycle has failed to meet its target goal.
This filters out issues that have failed to meet their target goal.
This filters issues where the current SLA cycle is paused due to a particular condition. For example, you may pause an issue's SLA clock when the issue's status is set to waiting for customer.
This filters issues where the SLA cycle is complete, meaning the issue has reached one of their stop events.
This filters issues where the current SLA clock is running, meaning the issue haven't yet reached one of the stop events.
This filters issues whose SLA clock is running or not running according to the SLA calendar, not conditions.
This filters issues where the SLA cycle's clock meets a specified time condition since the ongoing SLA cycle's start event.
This filters issues whose SLA cycle's clock meets a specified time condition before the issue will breach an SLA goal.
Here are some common character and word operators that you can use in your SLA JQL query:
=, >, >,=, ~, != < <= !~
not, in, is not, was, not, was not, in, not in, is, was, was in, changed
Here are some reserved characters and words in Jira that need to be used in a specific manner when using them in a query.
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 reserved characters or words in your queries, you need to:
surround them with quote marks. You can use either single or double quote marks. For example, ‘Time to first response’.
if you are searching a text field and the character is on the list of reserved characters or words, precede them with two backslashes. For example, \\'Time to first response'.
For example, if you wanted to find all the issues in your project that have successfully completed your first-response goals, use the following query:
“Time to first response“ != everBreached ()
For example, if you want to find requests that have been waiting for a first response for less than 10 minutes, use the following query:
"Time to first response" < elapsed("10m")
Or, if you want to find issues that will breach their resolution target within the next two hours, use this query:
"Time to resolution" < remaining ("2h")
Was this helpful?