スマート バリューを使用してリスト値にアクセスする
Check out how we use smart values in our Jira automation template library.
You can use smart values to access and format the value of items in a list of multiple options, for example, checkboxes, labels, and multi-selects.
View the smart values available to access and format lists.
例
You have a checkbox list called Sydney attractions with the following options: Harbour Bridge, Opera House, Bondi Beach. There are a number of different ways to use smart values to format this list.
// Simplest way to show a comma separated list of values
{{issue.Sydney attractions.value}}
Harbour Bridge, Opera House, Bondi Beach
// Display attractions separated with a dash
{{#issue.Sydney attractions}} {{value}}{{^last}}- {{/}}{{/}}
Harbour Bridge - Opera House - Bondi Beach
// Now separated by space
{{#issue.Sydney attractions}}{{value}} {{/}}
Harbour Bridge Opera House Bondi Beach
// OR
{{issue.Sydney attractions.value.join(" ")}}
Harbour Bridge Opera House Bondi Beach
The following field types use .value
to access the human readable label (you can also access .id
):
リストの選択
複数選択リスト
カスケード選択リスト
ラジオ ボタン
Multi-checkboxes
Multi-user picker
Multi-user pickers work in a similar way to other multi fields, except that you have full access to all user attributes (e.g. .displayName
).
例
You have a multi-user picker called users with the following options: John Smith, Jack Brown and Jill Jones. Smart values can be used to access and format the users in this list.
// Simply show their names
{{issue.users.displayName}}
John Smith, Jack Brown, Jill Jones
// Simply show their names
{{#issue.users}}{{displayName}} ({{emailAddress}}) {{/}}
John Smith (john@smith.com) Jack Brown (jack@brown.com) Jill Jones (jill@jones.com)