Jira 課題で利用できるすべてのスマート値を見つける

 

Smart values allow you to access and manipulate issue data within Jira. They can add significant power and complexity to your rules. For the majority of cases, you can choose a smart value from the list of available functions.

Jira 課題で利用可能なすべてのスマート値を表示することもできます。インスタンスが大幅にカスタマイズされている場合、REST API で適切なスマート値を検索する必要があります。

スマート値を見つける

The syntax follows the JSON representation of an issue in Jira, which can be accessed using the Jira Cloud REST API.

データを読みやすくするためには、JSON データをフォーマットする拡張機能やツールのダウンロードを検討してください。

次の URL から、課題の JSON 表現を確認してください:

https://<yourinstanceurl>/rest/api/2/issue/<issuekey>?expand=names

課題フィールドのスマート値を見つけるには、以下を行います。

  1. ルールに表示したいフィールド値まで移動し、そのフィールドをクリックします。

  2. フッターに表示されているドット表記をコピーします。

課題の JSON のスクリーンショット。ドット表記の「fields.priority.name」がハイライトされて、フッターでのその位置が示されています。

この例では、priority フィールドが選択され、スマート バリューが {{issue.fields.priority.name}} として表示されています。フィールド セクションは必要ないので省略し、スマート バリューは {{issue.priority.name}} または単に {{priority.name}} とすることができます。

expand=names パラメーターを使用する

課題の JSON を表示中にパラメーター「?expand=names」を使用すると、出力の最初にガイドが表示されます。

In the example below, the field Cascade List is a custom field and the name of the field isn’t shown.

課題の JSON のスクリーンショット。カスタム フィールドが展開されています。フィールドの URL、値、ID が表示されています。

You can reference this field in a smart value using {{customfield_10034.value}}. To make this smart value easier to read, you can also substitute customfield_10034 for the field’s name: {{Cascade List.value}}.

課題の JSON のスクリーンショット。「names」が展開されて「Cascade List」の横にあるカスタム フィールド ID がハイライトされています。

スマート バリューをテストする

To test what a smart value returns, use the Manual trigger with Log action. The result displays in the audit log, as shown below.

Learn more about debugging rules and smart values.

Jira Cloud の自動化ルールの監査ログ。[ログ] アクションが成功したことが示されて「This is the issue summary (これは課題の要約です)」と出力されています。

 

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

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