How to use Insight custom field to dynamically filter a Jira custom field

お困りですか?

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

コミュニティに質問


プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

目的

You have a Jira custom field and you would like to have another custom field that will show objects as options based on the selection of the Jira custom field.

This is achievable with Insight custom field, especially with the Filter Issue Scope (IQL) available in the Insight custom field configuration.


  • You have a Jira custom field of type Select List (single choice) called Author with the configuration as shown below. You would like another custom field called Book to show only books written by the selected author in the Jira custom field.

  • You have created an Insight object schema with an object type called Book, with books written by these authors as objects. 


ソリューション

  1. Create an Insight custom field, configure it to show up on the expected screen(s).

  2. Configure the Insight custom field with the following and the rest with the default option.
    1. Object Schema - Book
    2. Filter Scope (IQL) - objectType=Book
    3. Filter Issue Scope (IQL) - Author = ${customfield_xxxxx.name}
      1. If the Jira custom field allows multiple options, the filter issue scope should be changed to Author IN (${customfield_xxxxx.name${0}}). More about placeholder structure can be found at Advanced: Placeholders - Placeholder structure.
  3. You could also test the IQL on the object schema search to verify if it works consistently. To do so, combine the filter scope and filter issue scope IQLs and with the placeholder replaced. For instance,
    • objectType=Book and Author = "Mitch Albom"
  4. Test it out on the Customer Portal or Jira's create issue screen. Example result:


説明

For this example, the Filter Issue Scope (IQL) is the main key to the solution. This scope is used because we need to filter objects based on the value available on a Jira issue field and not another Insight field, and the use of placeholders is supported.

What does the IQL, Author = ${customfield_xxxxx.name} means? 

Author, on the left side of the equal sign, is one of the attributes of Book objects. The placeholder after the equal sign returns the name of the chosen value in the Author custom field, identified by the custom field ID. The ID has to be used if the field is a custom field. For system fields like issue assignee, priority, fix versions etc, refer to Advanced: Placeholders - Custom fields


説明 How to use Insight custom field to dynamically filter a Jira custom field
製品Insight - Asset Management




最終更新日: 2021 年 10 月 29 日

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

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