• 製品
  • 使用を開始する
  • 関連ドキュメント
  • リソース

JQL 関数

このページでは、高度な検索で使用する関数の情報について説明します。

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

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

approved()

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

承認が必要だったリクエストや、承認が最終決定済みのリクエストを検索します。

構文

1 approved()

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

Approval タイプのカスタム フィールド

サポートされる演算子

=

サポートされない演算子

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

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

approver()

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

ユーザーによる承認が必要または必要だったリクエストを検索します。これは OR 演算子を使用し、ユーザー名を指定する必要があります。

構文

1 approver(user,user)

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

Approval タイプのカスタム フィールド

サポートされる演算子

=

サポートされない演算子

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

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

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

breached()

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

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

構文

1 breached()

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

SLA

サポートされる演算子

= , !=

サポートされない演算子

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

  • 初回応答時間に違反した課題を検索:
    "Time to First Response" = breached()

cascadeOption()

"cascading select" カスタム フィールドの値が選択したものと一致する課題を検索します。

parentOption パラメーターは、cascading select フィールドの第 1 階層のオプションに対応します。childOption() パラメーターは、cascading select フィールドの第 2 階層のオプションに対応します。 

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

構文

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

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

"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")

  • "Location" カスタム フィールドの 1 階層の値が "USA" となっているすべての課題 (2 階層目の値の内容や有無は問わない) を検索:
    location in cascadeOption("USA")

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

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

  • "Referrer" カスタム フィールドの 1 階層の値が "none" で 2 階層の値が "none" となっている課題を検索:
    referrer in cascadeOption("\"none\"","\"none\"")

  • "Referrer" カスタム フィールドの 1 階層の値が "none" で 2 階層に値を持たない課題を検索:
    referrer in cascadeOption("\"none\"",none)

closedSprints()

Search for issues that are assigned to a completed Sprint.

It is possible for an issue to belong to both a completed Sprint(s) and an incomplete Sprint(s). See also 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 , WAS , WAS IN , WAS NOT , WAS NOT IN , CHANGED

  • 初回応答時間を 1 回以上達成した課題を検索:
    "Time to First Response" = completed()

componentsLeadByUser()

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

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

構文

1 2 componentsLeadByUser() componentsLeadByUser(username)

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

Component

サポートされる演算子

IN , NOT IN

サポートされない演算子

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

  • 自身がリードであるコンポーネントのオープンな課題を検索:
    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. Also, see lastLogin.

構文

1 currentLogin()

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

作成日、期限、解決日、更新日、Date/Time タイプのカスタム フィールド

サポートされる演算子

= , != , > , >= , < , <= WAS* , WAS IN* , WAS NOT* , WAS NOT IN* , CHANGED* * Only in predicate 

サポートされない演算子

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

  • 現在のセッション中に作成された課題を検索:
    created > currentLogin()

currentUser()

Perform searches based on the currently logged-in user. 

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

構文

1 currentUser()

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

担当者、報告者、投票者、ウォッチャー、作成者、ユーザー タイプのカスタム フィールド

サポートされる演算子

= , !=

サポートされない演算子

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

  • 自身に割り当てられた課題を検索:
    assignee = currentUser()

  • 自分が報告したが自分に割り当てられていない課題を検索:

    1 reporter = currentUser() AND (assignee != currentUser() OR assignee is EMPTY)

earliestUnreleasedVersion()

プロジェクトの未リリースのバージョンの中で一番古いバージョンに基づいて検索を実行します。「unreleasedVersions」も参照してください。

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

構文

1 earliestUnreleasedVersion(project)

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

影響バージョン、修正バージョン、Version タイプのカスタム フィールド

サポートされる演算子

= , != , ~ , !~ , > , >= , < , <=

IS, IS NOT, WAS, WAS NOT

サポートされない演算子

IN, NOT IN, WAS IN, WAS NOT IN, CHANGED

  • FixVersion が ABC プロジェクトの一番古い未リリースのバージョンである課題を検索:
    fixVersion = earliestUnreleasedVersion(ABC)

  • ABC プロジェクトの一番古い未リリースのバージョンに関連する課題を検索:
    affectedVersion = earliestUnreleasedVersion(ABC) or fixVersion = earliestUnreleasedVersion(ABC)

elapsed()

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

SLA サイクルの開始イベントに対し、SLA クロックが特定の相対的なタイミングにある課題を返します。  

構文

1 elapsed()

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

SLA

サポートされる演算子

= , !=, > , >= , < , <=

サポートされない演算子

~ IS , IS NOT , WAS , WAS IN , WAS NOT , WAS NOT IN , CHANGED

  • Find issues that have been waiting for a first response for more than 1 hour:
    "Time to First Response" > elapsed("1h")

endOfDay()

検索実行日の最終時刻に基づいて検索を実行します。

endOfWeekendOfMonthendOfYearstartOfDaystartOfWeekstartOfMonth、および startOfYear もご確認ください。

構文

1 2 endOfDay() endOfDay("inc")

where inc is an optional increment of (+/-)nn(y|M|w|d|h|m). If the time unit qualifier is omitted, it defaults to the natural period of the function, e.g. endOfDay("+1") is the same as endOfDay("+1d"). If the plus/minus (+/-) sign is omitted, plus is assumed.

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

作成日、期限、解決日、更新日、Date/Time タイプのカスタム フィールド

サポートされる演算子

= , != , > , >= , < , <= WAS* , WAS IN* , WAS NOT* , WAS NOT IN* , CHANGED** Only in predicate

サポートされない演算子

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

  • 期限が今日中である課題を検索:
    due < endOfDay()

  • 期限が明日中である課題を検索:
    due < endOfDay("+1")

endOfMonth()

検索実行日の月末に基づいて検索を実行します。

endOfDayendOfWeekendOfYearstartOfDaystartOfWeekstartOfMonth、および startOfYear もご確認ください。

構文

1 2 endOfMonth() endOfMonth("inc")

where inc is an optional increment of (+/-)nn(y|M|w|d|h|m). If the time unit qualifier is omitted, it defaults to the natural period of the function, e.g. endOfMonth("+1") is the same as endOfMonth("+1M"). If the plus/minus (+/-) sign is omitted, plus is assumed.

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

作成日、期限、解決日、更新日、Date/Time タイプのカスタム フィールド

サポートされる演算子

= , != , > , >= , < , <= WAS* , WAS IN* , WAS NOT* , WAS NOT IN* , CHANGED** Only in predicate

サポートされない演算子

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

  • 期限が今月中である課題を検索:
    due < endOfMonth()

  • 期限が来月中である課題を検索:
    due < endOfMonth("+1")

  • Find issues due by the 15th of next month:
    due < endOfMonth("+15d")

endOfWeek()

期日が今週中である課題を検索します。既定では、この関数は週の最終日を土曜日とみなします。週の最終日として別の日 (日曜日など) を使用することもできます。以下の例の構文を参照してください。 

endOfDayendOfMonthendOfYearstartOfDaystartOfWeekstartOfMonth、 および startOfYear もご確認ください。

構文

1 2 endOfWeek() endOfWeek("inc")

where inc is an optional increment of (+/-)nn(y|M|w|d|h|m). If the time unit qualifier is omitted, it defaults to the natural period of the function, e.g. endOfWeek("+1") is the same as endOfWeek("+1w"). If the plus/minus (+/-) sign is omitted, plus is assumed.

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

作成日、期限、解決日、更新日、Date/Time タイプのカスタム フィールド

サポートされる演算子

= , != , > , >= , < , <= WAS* , WAS IN* , WAS NOT* , WAS NOT IN* , CHANGED** Only in predicate

サポートされない演算子

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

  • 期日が今週中である課題 (初期設定では最終日は土曜日) を検索:
    due < endOfWeek()

  • 期日が今週中である課題を検索 (最終日は日曜日):
    due < endOfWeek("+1d")

  • 期限が来週中である課題を検索:
    due < endOfWeek("+1")

endOfYear()

検索実行日の年末に基づいて検索を実行します。

startOfDaystartOfWeekstartOfMonthendOfDayendOfWeekendOfMonth、およびendOfYear もご確認ください。

構文

1 2 endOfYear() endOfYear("inc")

where inc is an optional increment of (+/-)nn(y|M|w|d|h|m). If the time unit qualifier is omitted, it defaults to the natural period of the function, e.g. endOfYear("+1") is the same as endOfYear("+1y"). If the plus/minus (+/-) sign is omitted, plus is assumed.

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

作成日、期限、解決日、更新日、Date/Time タイプのカスタム フィールド

サポートされる演算子

= , != , > , >= , < , <= WAS* , WAS IN* , WAS NOT* , WAS NOT IN* , CHANGED** Only in predicate

サポートされない演算子

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

  • 期限が今年中である課題を検索:
    due < endOfYear()

  • 期限が来年の 3 月中である課題を検索:
    due < endOfYear("+3M")

everBreached()

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

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

構文

1 elapsed()

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

SLA

サポートされる演算子

= , !=

サポートされない演算子

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

  • 初回応答時間の目標を達成できなかった課題を検索:
    "Time to First Response" = everbreached()

futureSprints()

まだ開始されていないスプリントに割り当てられている課題を検索します。

It is possible for an issue to belong to both a completed sprint(s) and an incomplete sprint(s). 

構文

1 futureSprints()

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

Sprint

サポートされる演算子

IN , NOT IN

サポートされない演算子

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

  • 未開始のスプリントに割り当てられているすべての課題を検索:
    sprint in futureSprints()

issueHistory()

最近閲覧した課題、つまり [課題] ドロップダウン メニューの [最近表示した課題] セクションにある課題を検索します。

注意:

  • issueHistory() returns up to 50 issues, whereas the 'Recent Issues' drop-down returns only 5.

  • Jira にログインしていない場合、現在のブラウザ セッションから取得した課題のみが含まれます。

構文

1 issueHistory()

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

Issue

サポートされる演算子

IN , NOT IN

サポートされない演算子

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

  • 最近閲覧した課題の中で自身が担当している課題を検索:
    issue in issueHistory() AND assignee = currentUser()

issuesWithRemoteLinksByGlobalId()

指定されたグローバル ID のいずれかを持つリモート リンクに関連付けられている課題に基づいて検索を実行します。

この関数では 1 から 100 の globalId を指定できます。0、または 100 よりも大きい globalId を指定するとエラーになります。

構文

1 issuesWithRemoteLinksByGlobalId()

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

Issue

サポートされる演算子

IN , NOT IN

サポートされない演算子

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

  • "abc" の globalId を持つリモート リンクにリンクしている課題を検索:
    issue in issuesWithRemoteLinksByGlobalId(abc)

  • "abc" または "def" の globalId を持つリモート リンクにリンクしている課題を検索:
    issue in issuesWithRemoteLinksByGlobalId(abc, def)

lastLogin()

現在のユーザーの前回のセッション開始時間に基づいて検索を行います。currentLogin もご確認ください。

構文

1 lastLogin()

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

作成日、期限、解決日、更新日、Date/Time タイプのカスタム フィールド

サポートされる演算子

= , != , > , >= , < , <= WAS* , WAS IN* , WAS NOT* , WAS NOT IN* , CHANGED** Only in predicate

サポートされない演算子

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

  • 前回のセッション中に作成された課題を検索:
    created > lastLogin()

latestReleasedVersion()

特定のプロジェクトのリリース済みバージョンの中で一番最後にリリースされたバージョンに基づいて検索を実行します。「releasedVersions()」も参照してください。

 The "latest" is determined by the ordering assigned to the versions, not by actual Version Due Dates.

構文

1 latestReleasedVersion(project)

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

影響バージョン、修正バージョン、Version タイプのカスタム フィールド

サポートされる演算子

= , !=

サポートされない演算子

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

  • FixVersion が ABC プロジェクトの最新のリリース済みバージョンである課題を検索:
    fixVersion = latestReleasedVersion(ABC)

  • ABC プロジェクトの最新のリリース済みバージョンに関連する課題を検索:
    affectedVersion = latestReleasedVersion(ABC) or fixVersion = latestReleasedVersion(ABC)

linkedissue

エピックとサブタスクを検索します。課題がエピックではない場合、検索結果はその課題のすべてのサブタスクを返します。

構文

1 linkedissue = issueKey

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

Issue

サポートされる演算子

=、!=

  • 特定のエピックにリンクされているサブタスクを検索:

    1 linkedissue = epicKey-123

linkedIssues()

課題にリンクされている課題を検索します。特定のタイプのリンクに検索を制限できます。 

構文

1 2 linkedIssues(issueKey) linkedIssues(issueKey,CaseSensitiveLinkType)

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

Issue

サポートされる演算子

IN , NOT IN

サポートされない演算子

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

  • 特定の課題にリンクしている課題を検索:
    issue in linkedIssues(ABC-123)

  • 特定の課題から特定のリンク タイプでリンクしている課題を検索:
    issue in linkedIssues(ABC-123,"is duplicated by")

membersOf()

特定のグループのメンバーに基づく検索を実施します。

構文

1 membersOf(Group)

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

担当者、報告者、投票者、ウォッチャー、作成者、ユーザー タイプのカスタム フィールド

サポートされる演算子

IN , NOT IN , WAS IN , WAS NOT IN

サポートされない演算子

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

  • 担当者が "jira-administrators" グループのメンバーである課題を検索:
    assignee in membersOf("jira-administrators")

  • 複数のグループおよび特定のユーザーで検索:
    reporter in membersOf("jira-administators") or reporter in membersOf("jira-work-management-users") or reporter=jsmith

  • 特定のグループで検索 (特定のメンバーを除く):
    assignee in membersOf(QA) and assignee not in ("John Smith","Jill Jones")

  • 特定のグループのメンバーを除外:
    assignee not in membersOf(QA)

myApproval()

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

ログイン ユーザーによる承認が必要または必要だったリクエストを検索します。

構文

1 myApproval()

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

Approval タイプのカスタム フィールド

サポートされる演算子

=

サポートされない演算子

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

Find all requests that required my approval
approval = myApproval()

myPendingApproval()

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

現在、ログイン ユーザーによる承認が必要なリクエストを検索します。

構文

1 myPendingApproval()

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

Approval タイプのカスタム フィールド

サポートされる演算子

=

サポートされない演算子

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

現在、自身による承認が必要なすべてのリクエストを検索する
approvals = myPending()

myPending()

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

現在またはこれまでに、現在のユーザーによる承認を必要とするリクエストを検索します。

構文

1 myPending()

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

Approval タイプのカスタム フィールド

サポートされる演算子

=

サポートされない演算子

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

現在、または以前に自身による承認が必要だったすべてのリクエストを検索する
approvals = myPending()

now()

現在の時刻に基づいた検索を行います。

構文

1 now()

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

作成日、期限、解決日、更新日、Date/Time タイプのカスタム フィールド

サポートされる演算子

= , != , > , >= , < , <= WAS* , WAS IN* , WAS NOT* , WAS NOT IN* , CHANGED** Only in predicate

サポートされない演算子

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

  • 期限切れの課題を検索:
    duedate < now() and status not in (closed, resolved)

openSprints()

開始済みかつ未完了のスプリントに割り当てられている課題を検索します。

It is possible for an issue to belong to both a completed sprint(s) and an incomplete sprint(s). See also closedSprints(). 

構文

1 openSprints()

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

Sprint

サポートされる演算子

IN , NOT IN

サポートされない演算子

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

  • 未完了のスプリントに割り当てられた課題を検索:
    sprint in openSprints()

organizationMembers()

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

ある組織のメンバーが送信したすべてのリクエストを検索します。メンバーが組織と共有したリクエスト、未共有のリクエスト、および所属しているほかの組織に共有したリクエストが返されます。

構文

1 organizationMembers()

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

担当者、報告者、投票者、ウォッチャー、User タイプのカスタム フィールド

サポートされる演算子

IN , NOT IN , WAS IN , WAS NOT IN

サポートされない演算子

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

  • 組織 "Atlassian" のメンバーが送信したすべてのリクエストを検索:
    reporter in organizationMembers("Atlassian")

  • 組織 "Atlassian" または "ACME" のメンバー以外が送信したリクエストを検索:
    reporter not in organizationMembers("Atlassian","ACME")

parentEpic()

企業管理対象プロジェクトにのみ適用されます。

エピックにリンクされている課題とサブタスクを検索します。 

構文

1 parentEpic()

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

Issue

サポートされる演算子

= , != , IN , NOT IN

サポートされない演算子

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

  • エピック DEMO-123 の課題とサブタスクを検索:
    parentEpic = DEMO 123

  • エピック DEMO-1 または SAMPLE-4 の課題およびサブタスクを検索:
    parentEpic in (DEMO-1, SAMPLE-4)

paused()