Jira Cloud の高度な検索とは

The advanced search allows you to build structured queries using the Jira Query Language (JQL) to search for work items. You can specify criteria that you can't define in the quick or basic searches. For example, you can use the ORDER BY clause in JQL when you’re searching for work items. JQL can help gain key project insights and help you find not just issues but also important information in projects.

複雑な検索条件が不要な場合は、クイック検索をお試しください。

JQL is not a database query language, even though it uses SQL-like syntax. In advanced search, you can use queries to find your work items. Queries are a series of elements or parts, like fields, operators, and values, that are strung together to form a structure. Learn more about constructing JQL queries.

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

  • テキスト フィールドに「weaponry」と入力されていて、

  • 作成日に応じた昇順または降順での表示

  1. 基本JQL を切り替える

  2. JQL エディター

  3. エディターを展開する/折りたたむ

  4. 構文ヘルプ

  5. [検索] ボタン

  6. JQL クエリが 1 行よりも長い場合の行番号

  7. コンテキストに基づくオートコンプリート提案

JQL クエリで詳細検索を実行する

構文を利用した詳細検索または JQL は、プロジェクトから特定の情報を取得するための強力なツールです。JQL クエリの構築に関する詳細をご確認ください。

To use advanced search or JQL to find your work items:

  1. Select Search 🔍 in the navigation bar (or press / on your keyboard). Alternatively, select Filters in the navigation bar.

  2. Select View all work items.

    • 詳細検索ではなく基本検索が表示されている場合は、[JQL] (🔍 アイコンの横) を選択します。詳細検索または JQL 検索がすでに有効である場合は、基本検索に切り替えるオプションが表示されます。

  3. JQL クエリを入力します。

  4. Enter キーを押すか 🔍 を選択して、クエリを実行します。検索結果は、JQL クエリの条件に基づいて表示されます。

Jira は、クエリのコンテキストに基づいたオートコンプリートの候補のリストを表示します。オートコンプリート候補はアルファベット順に最初の 15 件のみを表示するため、探しているものが候補に表示されない場合はさらに文字を追加する必要がある場合があります。

JQL クエリを構築する

JQL クエリの構築方法を学んで、詳細検索を最大限に活用しましょう。シンプルな JQL クエリ (「句」とも呼ばれる) は、フィールドと、それに続く演算子、1 つ以上のまたは関数で構成されます。

 

説明

フィールド

JQL におけるフィールドとは、Jira フィールド (または Jira で定義済みのカスタム フィールド) のことを指します。フィールドを使用した高度な検索の詳細をご確認ください

演算子

JQL における演算子とは、その左側に記載されるフィールドと右側に記載される 1 つ以上の値 (または関数) を比較する、1 文字以上の記号または文字です。この句で真となる結果のみが返されます。一部の演算子では NOT キーワードを利用できます。演算子を使用した高度な検索の詳細をご確認ください

キーワード

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

  • 2 つ以上の句を結合して複雑な JQL クエリを形成する

  • 1 つ以上の句のロジックを変更する

  • 演算子のロジックを変更する

  • JQL クエリ内に明確な定義がある

  • JQL クエリの結果を変更する特定の関数を実行する

キーワードを使用した高度な検索の詳細をご確認ください

関数

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

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

関数を使用した高度な検索の詳細をご確認ください

例:

project = "TEST"

This query will find all work items in the "TEST" project. It uses the "project" field, the EQUALS operator, and the value "TEST".

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

project = "TEST" AND assignee = currentuser()

This query will find all work items in the "TEST" project where the assignee is the currently logged in user. It uses the "project" field, the EQUALS operator, the value "TEST",the "AND" keyword and the "currentuser()" function.

演算子の優先順位を設定する

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

For example, if you want to find all resolved work items in the 'SysAdmin' project, as well as all issues (any status, any project) currently assigned to the system administrator (bobsmith), you can use parentheses to enforce the precedence of the boolean operators in your query, i.e.

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

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

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

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

特殊文字

一般に、+ . , * / % ^ $ # @ [ ]などの英数字以外の文字は、検索用のインデックスが作成されず、クエリで無視されます。例外には、メール アドレスと URL が含まれます。

クエリを作成する際は、特殊文字やスペースでフレーズを一重引用符'または二重引用符"で囲むようにしてください (例: field ~ "email@atlassian.com")。また、一部の文字では 2 つのバックスラッシュ \\ を付ける必要がある場合があります (例: field ~ "\\(text")。

予約語

また、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"

JQL のタイプ

制限付き JQL クエリ

制限付き JQL とは、検索制限を必要とする JQL を指します。JQL には少なくとも 1 つの条件が必要です。その左側に "フィールド" の後に演算子、1 つ以上の値 (または関数) が続きます。制限付きクエリの例をいくつか示します。

  • project = TEST order by key; ここでは、project = TEST が JQL クエリの検索制限となります。

  • reporter = currentUser(); ここでは、reporter = currentUser() が JQL クエリの検索制限となります。

  • status IN ("To Do", "IN PROGRESS") AND priority >= Medium ORDER BY created; ここでは、status IN ("To Do", "IN PROGRESS")priority >= Medium が JQL クエリの検索制限となります。

無制限の JQL クエリ

一方、無制限の JQL は、検索制限のない JQL です。空のクエリや、order by 句のみをリストするクエリを使用できます。例:

  • order by createdDate

  • order by key

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

「フリー テキスト検索ツール」を使用する要約、説明、環境、コメント、カスタム フィールド

「フリー テキスト検索ツール」を使用するカスタム フィールドは、フリー テキスト フィールド、テキスト フィールド、読み取り専用テキスト フィールドなどの組み込みカスタム フィールド タイプです。

検索構文を使用したテキスト フィールドに関する詳細をご確認ください。

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

一般的に、簡易検索を使用して作成したクエリは、詳細な JQL 検索へ変換して再び簡易検索に戻せます。ただし、詳細な JQL 条件を使用して作成した複雑なクエリは、簡易検索に変換できない場合があります。特に次のような場合です。

  • OR 演算子が含まれるクエリ。代わりに IN 演算子を使用できます。例: project in (A, B)

  • NOT 演算子を含むクエリ

  • EMPTY 演算子を含むクエリ

  • 比較演算子 (!=、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/Work 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.

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

  • ご利用の Jira インスタンスで管理者が JQL のオートコンプリート機能を無効にしているかも可能性があります。

  • オートコンプリートは、関数パラメーターでは利用できません。

  • オートコンプリートの候補は、すべてのフィールドで表示されるわけではありません。フィールド リファレンスをチェックして、どのフィールドがオートコンプリートに対応しているかをご確認ください。

JQL クエリのエラーはどこで確認できますか?

入力中にクエリ内の無効なテキストにカーソルを合わせると、JQL エラーの詳細を表示できます。また、JQL クエリにエラーがある場合、[検索] を押すと Jira は JQL エディターの下にクエリ内の無効なテキストの行と文字番号と併せてエラーの詳細を表示します。

さらにヘルプが必要ですか?

アトラシアン コミュニティをご利用ください。