SLA 用の JQL クエリを作成する
JQL queries have an order that needs 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 JQL fields.
クエリの要素
JQL では 1 つのクエリに 4 つの基本要素があります。
フィールド
Fields are different types of information in the system. For example, a Jira Service Management field may be priority, work type, date created and project.
演算子
演算子はクエリの中心であり、フィールドと値とを関連付けます。一般的な演算子には、等しい (=)、等しくない (!=)、より少ない (<) などがあります。
値
値は、クエリ内の実際のデータです。例: paused() および remaining(“2h”)。
関数
Functions are special calculations within Jira to access specific data. For example, work items that have breached SLAs.
オプションとして、いくつかの選択キーワードでクエリ同士をリンクすることができます。キーワードは、特別な意味を持つ、言語での特定の単語です。例として、AND や OR などがあります。
JQL のシンプルなクエリは、フィールド、演算子、1 つ以上の値または関数 の順に構成されます。
例: project = Test
This query finds all work items in the Test project. It uses the project (field), the equals = (operator), and the Test (value).
SLA クエリの作成時に一般的に使用される関数
以下、SLA 用に JQL クエリを作成する際によく使用される関数です。
breached()
This filters out work items where the last SLA cycle has failed to meet its target goal.
everBreached()
This filters out work items that have failed to meet their target goal.
paused()
This filters work items where the current SLA cycle is paused due to a particular condition. For example, you may pause a work items SLA clock when the work item's status is set to waiting for customer.
completed()
This filters work items where the SLA cycle is complete, meaning the work item has reached one of their stop events.
running()
This filters work items where the current SLA clock is running, meaning the work items haven't yet reached one of the stop events.
withinCalendarHours()
This filters work items whose SLA clock is running or not running according to the SLA calendar, not conditions.
elapsed()
This filters work items where the SLA cycle's clock meets a specified time condition since the ongoing SLA cycle's start event.
remaining()
This filters work items whose SLA cycle's clock meets a specified time condition before the work item will breach an SLA goal.
よく使用される演算子
SLA の JQL クエリで使用できる一般的な文字や単語演算子をご紹介します。
文字
=、>、>、=、~、!=、<、<=、!~
単語
not、in、is not、was、not、was not、in、not in、is、was、was in、changed
予約文字と予約語
クエリで使用する際には特定の方法を使用する必要がある、Jira の予約文字と予約語の一部を紹介します。
文字
スペース (" ")、+、.、;、?、|、*、/、%、^、$、#、@、[ ]、 、
単語
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
クエリに予約文字や予約語を使用する場合は、以下が必要となります。
引用符で囲みます。1 組の引用符または二重引用符を使用できます。例: 'Time to first response'。
テキスト フィールドでの検索を行おうとしていて、対象の文字が予約文字または予約語のリストに含まれる場合は、手前に 2 つのバックスラッシュを付けます。例: \\'Time to first response'
JQL example: find work items breaching your SLA goals
For example, if you wanted to find all the work items in your project that have successfully completed your first-response goals, use the following query:
“Time to first response“ != everBreached ()
JQL example: find work items based on their SLA clock
たとえば、初回応答を 10 分未満待っているリクエストを検索する場合、以下のクエリを使用します。
"Time to first response" < elapsed("10m")
Or, if you want to find work items that will breach their resolution target within the next two hours, use this query:
"Time to resolution" < remaining ("2h")
この内容はお役に立ちましたか?