JQL 関数

This page describes information about functions that are used for advanced searching. Additional JQL functions may also be available through installed apps.

JQL における関数は単語のあとに括弧が続くもので、1 つ以上の値や Jira フィールドを含むことがあります。句では、関数の前に演算子があり、その前にフィールドがあります。関数は特定の Jira データまたは関数内のコンテンツの計算を実行し、関数または関数を利用する句では真となる結果のみを取得します。

検索クエリで指定されていないかぎり、JQL 検索の結果で空のフィールドが返されることはありません。現在のユーザーに割り当てられていない課題を検索するときに空のフィールド (未割り当ての課題) を含めるには、(assignee != currentUser() OR assignee is EMPTY) と入力して、未割り当ての課題を検索結果に含めます。

approved()

Jira Service Management サブスクリプションがあるサイトにのみ適用されます。

Search for all requests that have an approval with a final decision of approved.

構文

1 approved()

サポートされるフィールド

Custom fields of type Approval

サポートされる演算子

=

サポートされない演算子

!= , ~ , !~ , > , >= , < , <= , IS , IS NOT , IN , NOT IN , WAS , WAS IN , WAS NOT , WAS NOT IN , CHANGED

  • 承認済みのすべてのリクエストを検索:
    approvals = approved()

approver()

Jira Service Management サブスクリプションがあるサイトにのみ適用されます。

Search for requests where any specified user is an approver for a pending or completed approval step, and may or may not have already approved or declined the approval. You must specify a username.

構文

1 approver(user1, user2)

サポートされるフィールド

Custom fields of type Approval

サポートされる演算子

=

サポートされない演算子

!= , ~ , !~ , > , >= , < , <= , IS , IS NOT , IN , NOT IN , WAS , WAS IN , WAS NOT , WAS NOT IN , CHANGED

  • John Smith による承認が必要または必要だったリクエストを検索:
    approvals = approver(jsmith)

  • Find requests that require or required approval by John Smith or Sarah Khan:
    approvals = approver(jsmith, skhan)

breached()

Jira Service Management サブスクリプションがあるサイトにのみ適用されます。

直近の SLA で目標を達成できなかった課題を返します。

構文

1 breached()

サポートされるフィールド

SLA

サポートされる演算子

=,!=

サポートされない演算子

~ , !~ , >, >= , < , <= , IS , IS NOT , IN , NOT IN , WAS , WAS IN, WAS NOT , WAS NOT IN , CHANGED

  • Find issues where an SLA (“Time to First Response) was breached:
    "Time to First Response" = breached()

cascadeOption()

Search for issues that match the selected values of a Cascading Select custom field.

The parentOption parameter matches against the first tier of options in the cascading select field.

The childOption parameter matches against the second tier of options in the cascading select field, and is optional. 

none キーワードは、片方もしくは両方にのオプションに値を持たない課題を検索するときに使用します。

構文

1 2 cascadeOption(parentOption) cascadeOption(parentOption,childOption)

サポートされるフィールド

Custom fields of type Cascading Select

サポートされる演算子

IN , NOT IN

サポートされない演算子

= , != , ~ , !~ , > , >= , < , <= IS , IS NOT, WAS , WAS IN , WAS NOT , WAS NOT IN , CHANGED

  • "Location" カスタム フィールドの 1 階層の値が "USA"、2 階層の値が "New York" となっている課題を検索:
    location in cascadeOption("USA", "New York")

  • Find issues where a custom field ("Location") has the value "USA" for the first tier and any value (or no value) for the second tier:
    location in cascadeOption("USA")

  • Find issues where a custom field ("Location") has the value "USA" for the first tier and no value for the second tier:
    location in cascadeOption("USA", none)

  • "Location" カスタム フィールドの 1 階層と 2 階層の両方に値を持たない課題を検索:
    location in cascadeOption(none)

  • Find issues where a custom field ("Referrer") has the value "none" for the first tier and "none" for the second tier:
    referrer in cascadeOption("\"none\"", "\"none\"")

  • Find issues where a custom field ("Referrer") has the value "none" for the first tier and no value for the second tier:
    referrer in cascadeOption("\"none\"", none)

choiceOption()

Search for issues that match the selected IDs of a Multiple Choice or Dropdown custom field.

Requires at least one argument. For multiple arguments, returns the ID of each one. Arguments must be valid option values. In cases where the argument could be both an ID and the option value, returns issues where the option value matches.

構文

1 2 choiceOption(ValueOption) choiceOption(ValueOption1,ValueOption2,ValueOption3)

サポートされるフィールド

Custom fields of types Multiple Choice and Dropdown

サポートされる演算子

IN,NOT IN

サポートされない演算子

= , != , ~ , !~ , > , >= , < , <= , IS , IS NOT, WAS , WAS IN ,
WAS NOT , WAS NOT IN , CHANGED

  • Find issues where a custom field ("Product Version") has the value
    ”123”:
    "Product Version[Select List (multiple choices)]" in choiceOption(123)

closedSprints()

完了したスプリントに割り当てられている課題を検索します。

完了したスプリントと未完了のスプリントの両方に 1 つの課題が属している場合もあります。openSprints() もご確認ください。

構文

1 closedSprints()

サポートされるフィールド

Sprint

サポートされる演算子

IN,NOT IN

サポートされない演算子

= , != , ~ , !~ , > , >= , < , <= , IS , IS NOT, WAS , WAS IN ,
WAS NOT , WAS NOT IN , CHANGED

  • 完了済みのスプリントに割り当てられているすべての課題を検索:
    sprint in closedSprints()

completed()

Jira Service Management サブスクリプションがあるサイトにのみ適用されます。

1 つ以上のサイクルを完了した SLA を持つ課題を返します。 

構文

1 completed()

サポートされるフィールド

SLA

サポートされる演算子

=,!=

サポートされない演算子

~ , !~ , >, >= , < , <= , IS , IS NOT , IN , NOT IN , WAS ,
WAS IN , WAS NOT , WAS NOT IN , CHANGED

  • Find issues where an SLA (“Time to First Response”) has completed at least one cycle:
    "Time to First Response" = completed()

componentsLeadByUser()

特定のユーザーが主導しているコンポーネント内の課題を検索します。必要に応じてユーザーを指定できます。ユーザーを指定しない場合、現在のユーザー (自身) が使用されます。 

Jira にログインしていない場合は、ユーザーを指定する必要があります。

構文

1 2 componentsLeadByUser() componentsLeadByUser(username)

サポートされるフィールド

Component

サポートされる演算子

IN,NOT IN

サポートされない演算子

=!=~!~>>=<<=ISIS NOTWASWAS INWAS NOTWAS NOT INCHANGED

  • 自身がリードであるコンポーネントのオープンな課題を検索:
    component in componentsLeadByUser() AND status = Open

  • Bill がリードであるコンポーネントのオープンな課題を検索:
    component in componentsLeadByUser(bill) AND status = Open

currentLogin()

Perform searches based on the time at which the current user's session began. See also lastLogin().

構文

1 currentLogin()

サポートされるフィールド

Created, Due, Resolved, Updated, custom fields of type Date/Time

サポートされる演算子

= , != , > , >= , < , <= , WAS* , WAS IN* , WAS NOT* , WAS NOT IN*, CHANGED*

* Only in predicate 

サポートされない演算子

~ , !~ , IS , IS NOT , IN , NOT IN

  • Find issues that have been created during your current session:
    created > currentLogin()

currentUser()

現在のログイン ユーザーに基づいて検索を実行します。 

この関数は、ログイン済みのユーザーのみが使用できます。したがって、匿名ユーザーが利用することを想定したフィルターを作成する場合、この関数を使うことはできません。

構文

1 currentUser()

サポートされるフィールド

Assignee, Reporter, Voter, Watcher, Creator, custom fields of type User

サポートされる演算子

=,!=

サポートされない演算子

~ , !~ , > , >= , < , <= , IS , IS NOT , IN , NOT IN , WAS ,
WAS IN, WAS NOT , WAS NOT IN , CHANGED

  • Find issues that are assigned to you:
    assignee = currentUser()

  • Find issues that were reported by you but are not assigned to you:
    reporter = currentUser() AND assignee != currentUser()

customerDetail()

顧客の詳細に基づいて検索を実行します。

この JQL 関数を使用するには、[プロジェクト設定] の "機能" ページで [カスタマー サービス管理] をオンにします。

この関数は、最大 32000 のカスタマーを返します。

構文

1 customerDetail()

サポートされるフィールド

Assignee, Reporter, Voter, Watcher, custom fields of type User

サポートされる演算子

IN,NOT IN

サポートされない演算子

= , != , ~ , !~ , > , >= , < , <= , IS , IS NOT , WAS , WAS IN ,
WAS NOT IN , WAS NOT , CHANGED

  • Find all requests reported by customers in the APAC region:
    reporter in customerDetail("Region", "APAC")

  • Find all requests reported by customers who are not technical contacts:
    reporter not in customerDetail("Role", "Technical Contact")

earliestUnreleasedVersion()

Perform searches based on the earliest unreleased version in a project. See also unreleasedVersions().

バージョンの順序は、プロジェクトの [リリース] ページにバージョンが表示される順序によって決まります。一覧の一番下のバージョンが "一番古い" ものとなります。バージョンの順序を変更するには、一覧でバージョンをドラッグ アンド ドロップして新しい場所に配置します。

構文