詳細検索

robotsnoindex

詳細検索では、Jira クエリ言語 (JQL: JIRA Query Language) を使用して構造的なクエリを作成して課題を検索できます。クイック検索や基本検索では定義できない検索条件を指定できます (例: ORDER BY 句)。 

tip/resting Created with Sketch.

If you don't have complex search criteria, try quick search instead.

JQL は SQL に似た構文を使用しますが、データベース クエリ言語ではありません。

Search for issues using JQL

  1. ナビゲーション バーで [フィルター] を選択します。
  2. [高度な課題検索] を選択します。
    • 高度な検索ではなく簡易検索が表示されている場合、[高度な検索] ( アイコンの横) をクリックします。高度な検索がすでに有効な場合、簡易検索に切り替えるオプションが表示されています。

  3. Enter your JQL query. As you type, Jira will offer a list of "autocomplete" suggestions based on the context of your query. Note, autocomplete suggestions only include the first 15 matches, displayed alphabetically, so you may need to enter more text if you can't find a match.

  4. Press Enter or click  to run your query. Your search results will be displayed in the issue navigator.

Search for issues using JQL in a project

You can build structured queries using the Jira Query Language (JQL) to search for issues in a project. You can specify criteria that you can't define in the quick or basic searches (the ORDER BY clause, for example). 

JQL は SQL に似た構文を使用しますが、データベース クエリ言語ではありません。

To search for issues using JQL:

  1. From your project’s sidebar, select Issues.

  2. If you're in the Basic search mode, select JQL.

  3. Enter your JQL query.

  4. Press Enter or click 🔍  to run your query. Your search results will be displayed in the issue navigator.

As you type your query, Jira will offer a list of "autocomplete" suggestions based on the context of your query. The autocomplete suggestions only include the first 15 matches, displayed alphabetically, so you may need to enter more text if you can't find a match. Jira will also let you know if there’s an error in your query.

Using JQL, you could search for all issues in your project “Assassin’s guild” that:

  • have “weaponry” in a text field, and

  • are ordered by when they were created in ascending or descending order

  1. Basic or JQL toggle

  2. JQL editor

  3. Expand/Collapse editor

  4. Syntax help

  5. Search button

  6. Line numbers when your JQL query is longer than a line

  7. Autocomplete suggestions based on context

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

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

JQL クエリの構築

シンプルな JQL クエリ ('句') は、フィールドと、それに続く演算子、1 つ以上のまたは関数で構成されます。例えば以下のようなものがあります。

project = "TEST"

このクエリは "TEST" プロジェクトのすべての課題を検索します。この JQL は "project" フィールドと、EQUALS 演算子と、"TEST" というを利用しています。

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

project = "TEST" AND assignee = currentuser()

このクエリは "TEST" プロジェクトの中で、現在ログインしているユーザーが担当者である課題を検索します。この JQL は "project" フィールド、EQUALS 演算子、"TEST", というに加えて、"AND" キーワードと "currentuser()" 関数で構成されます。

Learn more about fields, operators, keywords and functions below.

演算子の優先順位の設定

複雑な JQL で優先順位を設定したいときには丸括弧を使用できます。

例えば、'Sysadmin' プロジェクトのすべての解決済み課題と、システム管理者 (ユーザー名は bobsmith) に割り当てられたすべての課題 (ステータスとプロジェクトは問わない) を検索する場合、以下のように括弧を使用して boolean 演算子の優先順位を設定します。

(status=resolved AND project=SysAdmin) OR assignee=bobsmith

括弧を使用しない場合、ステートメントは左から右に評価されます。

句をグループ化するために丸括弧を使うこともできます。これは NOT 演算子を使うときなどに利用します。

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

予約文字

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

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

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

例:

  • version = "[example]"

You can't search for many special characters in text fields using this method. Learn more about using search syntax for text fields.

予約語

JQL には予約語もあります。これらの言葉をクエリで利用する場合は、引用符 (シングルクォテーションもしくはダブルクォテーション) で囲む必要があります。

"a", "an", "abort", "access", "add", "after", "alias", "all", "alter", "and", "any", "are", "as", "asc", "at", "audit", "avg", "be", "before", "begin", "between", "boolean", "break", "but", "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", "it", "join", "last", "left", "less", "like", "limit", "lock", "long", "max", "min", "minus", "mode", "modify", "modulo", "more", "multiply", "next", "no", "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", "such", "sum", "synonym", "table", "that", "the", "their", "then", "there", "these", "they", "this", "to", "trans", "transaction", "trigger", "true", "uid", "union", "unique", "update", "user", "validate", "values", "view", "was", "when", "whenever", "where", "while", "will", "with"

テキスト検索の実施

以下のフィールドで検索を実行する場合、CONTAINS 演算子を使用してテキスト検索機能を利用することができます。

概要、説明、環境、コメント、"Free Text Searcher" を使用するカスタム フィールド (組み込みのカスタム フィールド タイプのうち、フリー テキスト フィールド、テキスト フィールド、読み取り専用のテキスト フィールドを使用しているカスタム フィールド)

Learn more about using search syntax for text fields.

フィールド

A field in JQL is a word that represents a Jira field (or a custom field that has already been defined in Jira). Learn more about using fields for advanced searching.

演算子

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. Learn more about using operators for advanced searching.

キーワード

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

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

Learn more about using keywords for advanced searching.

関数

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

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

Learn more about using functions for advanced searching.

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

保存した検索 (フィルターとして保存) は、高度な検索の利用時に、サイドバーに表示されます。サイドバーが表示されていない場合は、カーソルを画面の左側に合わせてクリックすることで展開できます。

[オープンな担当課題] などのフィルターを実行したい場合は、フィルターをクリックします。詳細検索用の JQL が設定され、検索結果が表示されます。

トラブルシューティング

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

In general, a query created using the basic search can be translated to advanced JQL search, and back again. However, a complex query created using advanced JQL criteria may not be translated to basic search, particularly if:

  • OR 演算子が含まれるクエリ。代わりに IN 演算子を使用できます。例: project in (A, B)
  • NOT 演算子を含むクエリ
  • EMPTY 演算子を含むクエリ
  • 比較演算子 (!=、IS、IS NOT、>、>=、<、<=) を含むクエリ
  • 特定のプロジェクト固有のフィールドおよび値を指定している (バージョン、コンポーネント、カスタム フィールドなど) が、そのプロジェクト名が明確に指定されていないクエリ (例: fixVersion = "4.0"AND project=JRA の指定がない場合)。カスタム フィールドはプロジェクト / 課題タイプ レベルで構成されるため、この制限の影響を受けやすくなることににご注意ください。一般に、ベーシック検索で作成できないクエリを、詳細検索からベーシック検索に変換することで作成することはできません。

Why can't I see autocomplete suggestions?

  • ご利用の Jira インスタンスで管理者が JQL のオートコンプリート機能を無効にしているかも可能性があります。
  • オートコンプリートは、関数パラメーターでは利用できません。
  • Auto-complete suggestions are not offered for all fields. Check the fields reference to see which fields support autocomplete.

Where can I see the error in my JQL query?

While typing, you can hover over the invalid text of your query to know more about the JQL error. Alternatively, if your JQL query has an error, you can hit search and Jira will display the specifics of the error below the JQL editor, along with the line and character number of the invalid text in the query.

最終更新日: 2023 年 2 月 1 日

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

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