詳細検索

The advanced search allows you to build structured queries using the Jira Query Language (JQL) to search for issues. You can specify criteria that cannot be defined in the quick or basic searches. For example, you can use the ORDER BY clause to sort Jira issues either in descending or ascending order or narrow down your search results for the desired date range.

tip/resting Created with Sketch.

Learn more about searching in Jira from JQL: The most flexible way to search Jira (on the Atlassian blog)

詳細検索の使用前に、次の点を考慮してください。

  • 複雑な検索条件ではない場合、クイック検索を利用することをおすすめします。
  • If you aren't comfortable with the Jira Query Language (JQL), you may want to use basic search instead.

Note that JQL isn't a database query language, even though it uses SQL-like syntax. 


The following is the example of an advanced search query in Jira that returns all issues for the Teams in the Space project. 

  1. 検索結果を絞り込む JQL クエリ
  2. 検索条件に一致する Jira 課題のリスト。

On this page:

高度な検索を使用する

  1. Go to Issues (in the header) > Search for issues.

    • 既存の検索条件が表示されている場合は、[新規検索] ボタンを選択して検索条件をリセットします。
    • 詳細検索の代わりに基本検索が表示されている場合は、[詳細] ([検索] ボタンの横) を選択します。

      If you cannot switch to an advanced search, check out the following section.

  2. JQL クエリを入力します。Jira は、入力中のクエリのコンテキストに基づいて「オートコンプリート」の候補リストを表示します。オートコンプリートはアルファベット順に最初の 15 個の候補のみを表示するため、探しているものが候補に見つからない場合はもっと多くの文字列を入力する必要が生じる可能性があります。 

    オートコンプリートの候補が表示されないのはなぜですか?

    オートコンプリートの候補が表示されない場合は、次の原因が考えられます。

    • ご利用の Jira インスタンスで管理者が JQL のオートコンプリート機能を無効にしているかも可能性があります。
    • オートコンプリートは、関数パラメーターでは利用できません。
    • オートコンプリートの候補は、一部のフィールドで表示されません。フィールドの参照をチェックして、どのフィールドがオートコンプリートに対応しているかをご確認ください。
  3. Press Enter or click Search to run your query. Your search results will display in the issue navigator.

基本と詳細の各検索を切り替える

一般的に、基本検索によって作成したクエリを詳細検索に変換して、再度基本検索に戻せます。ただし、詳細検索によって作成されたクエリは基本検索に変換できない場合があります。詳細は以降のセクションをご参照ください。

ベーシック検索と詳細検索を切り替えられないのはなぜですか?

次の場合は、2 つの検索を切り替えられません。

  • OR 演算子を含むクエリ。

    You can have an IN operator and it will be translated, e.g. project in (A, B). Even though this query: (project = JRA OR project = CONF) is equivalent to this query: (project in (JRA, CONF)), only the second query will be translated.

    • NOT 演算子を含むクエリ。
    • EMPTY 演算子を含むクエリ。
    • the query contains any of the comparison operators: !=, IS, IS NOT, >, >=, <, <=
    • the query specifies a field and value that is related to a project (e.g. version, component, custom fields) and the project is not explicitly included in the query (e.g. fixVersion = "4.0", without the AND project=JRA). This is especially tricky with custom fields since they can be configured on a Project/Issue Type basis. The general rule of thumb is that if the query cannot be created in the basic search form, then it will not be able to be translated from advanced search to basic search.

For a full list of supported operators and their use cases, go to the Operators reference page.  

詳細検索について理解する

詳細検索を最大限に活用するために、次のトピックをご参照ください。

JQL クエリの構築

シンプルな JQL クエリ (別名「句」) は、フィールドとそれに続く演算子、1 つ以上のまたは関数で構成されます。

例 1

This query will find all issues in the TEST project:

project = "TEST"

It uses the project field, the EQUALS operator, and the value TEST. 

例 2

より複雑なクエリには以下のようなものがあります。

project = "TEST" AND assignee = currentUser()

このクエリは TEST プロジェクトにあるすべての課題のうち、現在ログインしているユーザーが assignee の課題を検索します。project フィールド、EQUALS 演算子TEST, AND キーワード、currentUser() 関数を使用します。

例 3

特定フィールドの複数の値を検索する JQL クエリです。このクエリは、Component フィールドに値 accessibility"3rd-party apps" のあるタイプ Bug の課題をすべて検索します。

issuetype =  Bug AND component in (accessibility, "3rd-party apps")

クエリではissuetype フィールド、EQUALS 演算子、値 BugAND キーワード、component フィールド、IN 演算子を使用しています。

例 4

今年のはじめ以降に作成されて、今月のはじめ以降に更新された課題を検索する JQL クエリは次のようになります。

project = "Analytics" and created > startOfYear() and updated > startOfMonth()

例 5

Test プロジェクトで発生した課題のうち、要約や説明に「pre-landing report」というテキストを含むものを検索する JQL クエリです。

project = "Test" AND text ~ "pre-landing report"

フィールド、演算子、キーワード、関数に関する詳細は、参照セクションをご参照ください。

JQL クエリの優先順位

Precedence in JQL queries depends on keywords that you use to connect your clauses. For example, a clause can be: project = “Teams in Space”. The easiest way to look at this is to treat the AND keyword as the one grouping clauses, and OR as the one separating them. The AND keyword takes precedence over other keywords because it groups clauses together, essentially turning them into one combined clause.

例 1

status=resolved AND project=“Teams in Space” OR assignee=captainjoe

このクエリは、Teams in Space プロジェクトにあるすべての resolved 課題 (AND によってグループ化された句) と captainjoe に割り当てられたすべての既存の課題を返します。OR キーワードに続く句は別の句として扱われます。

例 2

status=resolved OR project="Teams in Space" AND assignee=captainjoe

一方、このクエリは、Teams in Space プロジェクトからの captainjoe の課題 (AND でグループ化された句) と既存のすべての resolved 課題を返します (OR で区切られた句)。

例 3

status=resolved OR projects="Teams in Space" OR assigne=captainjoe

OR キーワードのみを使用する際は、すべての句が別々に扱われて優先順位は等しくなります。

優先順位の設定

かっこを使用すると、JQL クエリの優先順位を設定できます。かっこは特定の句をグループ化し、優先的に扱います。

例 1

As you can see in this example, parentheses can turn our example JQL query around. This query would return resolved issues that either belong to the Teams in Space project or are assigned to captainjoe.

status=resolved AND (project="Teams in Space" OR assignee=captainjoe)

例 2

If you used parentheses like in the following example, they wouldn’t have any effect because the clauses enclosed in parentheses were already connected by AND. This query would return the same results with or without the parentheses.

(status=resolved AND project="Teams in Space") OR assignee=captainjoe

制限されている言葉および文字

予約文字

JQLには次の一連の予約文字があります。

space (" ")+.,;?|*/%^$#@[]

これらの文字をクエリで利用したい場合、次のようにする必要があります。

  • surround them with quotation marks. You can use either single quote-marks (') or double quote-marks ("). 
    and
  • if you are searching a text field and the character is on the list of special characters in text searches, precede them with two backslashes. This will let you run the query that contains a reserved character, but the character itself will be ignored in your query. For details, see Special characters in Search syntax for text fields.

例:

  • version = "[example]"
  • summary ~ "\\[example\\]"

予約語

また、JQL には予約語のリストが用意されています。これらの単語をクエリで使用する場合は、引用符 (一重または二重) で囲む必要があります。

展開して予約語のリストを表示する

"abort", "access", "add", "after", "alias", "all", "alter", "and", "any", "as", "asc", "audit", "avg", "before", "begin", "between", "boolean", "break", "by", "byte", "catch", "cf", "char", "character", "check", "checkpoint", "collate", "collation", "column", "commit", "connect", "continue", "count", "create", "current", "date", "decimal", "declare", "decrement", "default", "defaults", "define", "delete", "delimiter", "desc", "difference", "distinct", "divide", "do", "double", "drop", "else", "empty", "encoding", "end", "equals", "escape", "exclusive", "exec", "execute", "exists", "explain", "false", "fetch", "file", "field", "first", "float", "for", "from", "function", "go", "goto", "grant", "greater", "group", "having", "identified", "if", "immediate", "in", "increment", "index", "initial", "inner", "inout", "input", "insert", "int", "integer", "intersect", "intersection", "into", "is", "isempty", "isnull", "join", "last", "left", "less", "like", "limit", "lock", "long", "max", "min", "minus", "mode", "modify", "modulo", "more", "multiply", "next", "noaudit", "not", "notin", "nowait", "null", "number", "object", "of", "on", "option", "or", "order", "outer", "output", "power", "previous", "prior", "privileges", "public", "raise", "raw", "remainder", "rename", "resource", "return", "returns", "revoke", "right", "row", "rowid", "rownum", "rows", "select", "session", "set", "share", "size", "sqrt", "start", "strict", "string", "subtract", "sum", "synonym", "table", "then", "to", "trans", "transaction", "trigger", "true", "uid", "union", "unique", "update", "user", "validate", "values", "view", "when", "whenever", "where", "while", "with"

Jira 管理者の場合、このリストは JqlStringSupportImpl.java ファイルにハードコードされていることにご注意ください。

テキスト検索の実施

次のフィールドにおける検索の実行には、CONTAINS 演算子によって Lucene の文字検索機能を使用できます。 

展開してテキスト フィールドのリストを表示する
  • 要約。
  • 説明。
  • 環境。
  • コメント。
  • 「フリー テキスト検索ツール」を使用するカスタム フィールド。これらはフリー テキスト、テキスト、読み取り専用テキストの各フィールドのような、組み込みカスタム フィールド タイプのカスタム フィールドです。

When searching for text fields, you can also use single and multiple character wildcard searches. For more information, see Search syntax for text fields.

日付検索と時間検索の違い

日 (1d) と時間 (24h) の値はクエリで異なる方法によって計算されるため、同じ結果は返されません。

  • "1d" を指定すると、ユーザーが正確な時刻を追加しない限り、サーバー タイムゾーンの 00:00 を一日の始まりとして、そこから計算を開始します。また、クエリをすぐに実行すると、"1d" には当日も含まれます。クエリを実行した時間 (JQL を実行した時点から 24 時間後) に対する相対的な時間は考慮されません。

  • "24h" を使うと、クエリを実行した時間 (JQL を実行した時間から -24 時間) から計算を開始します。

昨日の午後 3 時に課題のステータスを「クローズ」に更新したとします。今日の午後 1 時に次のクエリを実行しました。

  • status changed to "Closed" after -1d は、クローズされた課題を返しません。ただし、status changed to "Closed" after -2d を実行すると、結果が返されます。 

  • status changed to "Closed" after -24h はクローズした課題を返します。

リファレンス

Here you can find a brief overview of Jira fields, operators, keywords, and functions used to compose JQL queries. For a detailed description  and examples of their usage for advance searching, check the links from the Reference column.


説明 リファレンス
フィールド

JQL でフィールドとは、Jira フィールド (または Jira で定義済みのカスタム フィールド) を表す語です。Jira フィールドで詳細検索を実行して、特定の日付 (または日付範囲) と時刻と、それ以前またはそれ以後に発生した課題を探せます。

To view a detailed information about fields and how to use them for advanced searching, check out Fields reference page

フィールドの一覧を表示する

  • affectedVersion
  • approvals
  • assignee
  • attachments
  • category
  • comment
  • component
  • created
  • creator
  • customFieldName
  • "Customer Request Type"
  • description
  • due
  • environment
  • "epic link"
  • filter
  • fixVersion
  • issueKey
  • Issue link type
  • labels
  • lastViewed
  • level
  • originalEstimate
  • parent
  • priority
  • project
  • remainingEstimate
  • reporter
  • request-channel-type
  • request-last-activity-time
  • resolution
  • resolved
  • sprint
  • status
  • summary
  • text
  • timeSpent
  • type
  • updated
  • voter
  • votes
  • watcher
  • watchers
  • worklogAuthor
  • WorklogComment
  • WorklogDate
  • WorkRatio

演算子

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.

To view a detailed information about operators and how to use them for advanced searching, check out operators reference page

演算子の一覧を表示する

  • EQUALS: =
  • NOT EQUALS: !=
  • GREATER THAN: >
  • GREATER THAN EQUALS: >=
  • LESS THAN: <
  • LESS THAN EQUALS: <=
  • IN
  • NOT IN
  • CONTAINS: ~
  • DOES NOT CONTAIN: !~
  • IS
  • IS NOT
  • WAS
  • WAS IN
  • WAS NOT IN
  • WAS NOT
  • CHANGED

キーワード

JQL のキーワードは、次のいずれかを行う単語または語句です。

  • 2 つ以上の句を結合して複雑な JQL クエリを形成する
  • 1 つ以上の句のロジックを変更する
  • 演算子のロジックを変更する
  • JQL クエリ内に明確な定義がある
  • JQL クエリの結果を変更する特定の関数を実行する

To view a detailed information about keywords and how to use them for advanced searching, check out keywords reference page

キーワード一覧を表示する

  • AND
  • OR
  • NOT
  • EMPTY
  • NULL
  • ORDER BY

関数

JQL における関数とは、言葉に丸括弧が続くもので、1 つ以上の値や Jira フィールドを含むことがあります。

関数は特定の Jira データまたは関数内のコンテンツの計算を実行し、関数または関数を利用する句では真となる結果のみを取得します。


To view a detailed information about functions and how to use them for advanced searching, check out functions reference page

関数の一覧を表示する

  • approved()
  • approver()
  • cascadeOption()
  • closedSprints()
  • componentsLeadByUser()
  • currentLogin()
  • currentUser()
  • earliestUnreleasedVersion()
  • endOfDay()
  • endOfMonth()
  • endOfWeek()
  • endOfYear()
  • issueHistory()
  • issuesWithRemoteLinksByGlobalId()
  • lastLogin()
  • latestReleasedVersion()
  • linkedIssues()
  • membersOf()
  • myApproval()
  • myPending()
  • now()
  • openSprints()
  • pending()
  • pendingBy()
  • projectsLeadByUser()
  • projectsWhereUserHasPermission()
  • projectsWhereUserHasRole()
  • releasedVersions()
  • standardIssueTypes()
  • startOfDay()
  • startOfMonth()
  • startOfWeek()
  • startOfYear()
  • subtaskIssueTypes()
  • unreleasedVersions()
  • votedIssues()
  • watchedIssues()

保存された検索条件の実行

You can find saved searches (also known as Saving your search as a filter) in the left-side panel, when using advanced search. If the left panel is not showing, hover your mouse over the left side of the screen to display it.

New_issues などのフィルターを実行するには、フィルター名を選択します。詳細検索の JQL が設定されて、検索結果が表示されます。

  1. フィルターとして保存された検索。JQL クエリで指定された条件に基づいて課題が返されます。

  2. 検索条件を指定する JQL クエリ。 

  3. 検索条件に一致する課題

保存した検索を削除する場合は「フィルターの削除」をご参照ください。 


最終更新日 2022 年 8 月 16 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.