Update Multiple Choice Fields Using Automation in Jira

プラットフォームについて: Cloud と Data Center - この記事は クラウド プラットフォームとデータセンター プラットフォームの両方に等しく当てはまります。

Server* 製品のサポートは 2024 年 2 月 15 日に終了しました。Server 製品を実行している場合は、 アトラシアン Server サポート終了 のお知らせにアクセスして、移行オプションを確認してください。

*Fisheye および Crucible は除く

要約

Updating a select field with multiple choices using a JSON formula can be challenging.

This article provides examples and rules to update this field type, using either:

  • Explicit values

  • Content of single-choice select fields

  • Content of multiple-choice select fields

  • Other types of fields, such as a text field

ソリューション

シナリオ

For each scenario below, we will assume that the custom field we are trying to update is Select List Multiple Choices. If your field's name が異なる場合は、次に示すすべてのシナリオで必ず変更してください。

シナリオ 1 - "選択" フィールド (複数選択) を明示的な値で更新する

To replace the content of the field with specific values:

オプション 1

  • [課題を編集] アクションを追加します

  • [フィールドを選択] オプションで更新するフィールドを選択します

  • Enter the options in the Select List Multiple Choices list

オプション 2

  • [課題を編集] アクションを追加します

  • [その他のオプション] の設定を展開します

  • 次の JSON 式を使用します (フィールドの名前と追加する値に基づいて、必ず更新してください)

    { "fields": { "Select List Multiple Choices": [ {"value" : "Option 1"}, {"value" : "Option 2"} ] } }

元の内容を上書きせずにフィールドを編集する場合:

オプション 1

  • [課題を編集] アクションを追加します

  • [フィールドを選択] オプションで更新するフィールドを選択します

  • スマート値 {{issue.Select List Multiple Choices}} に加えて、オプションを入力します。このスマート値を追加すると、ルールによって元の内容が削除されるのを防げます。

オプション 2

  • [課題を編集] アクションを追加します

  • [その他のオプション] の設定を展開します

  • 次の JSON 式を使用します (フィールドの名前と追加する値に基づいて、必ず更新してください)

    { "update": { "Select List Multiple Choices": [ {"add": {"value":"Option 1"}}, {"add": {"value":"Option 2"}} ] } }

シナリオ 2 - "選択" フィールド (複数選択) を "選択" フィールド (単一選択) の内容で更新する

To replace the content of the field with values coming from 2 select fields (single choice)

オプション 1

  • [課題を編集] アクションを追加します

  • [フィールドを選択] オプションで更新するフィールドを選択します

  • Enter the list of options list below

    • {{issue.Select List Single Choice 1}}

    • {{issue.Select List Single Choice 2}}

オプション 2

  • [課題を編集] アクションを追加します

  • [その他のオプション] の設定を展開します

  • 次の JSON 式を使用します (フィールド名に基づいて、必ず更新してください)。

{ "fields": { "Select List Multiple Choices": [ {"value":"{{issue.Select List Single Choice 1.value}}"}, {"value":"{{issue.Select List Single Choice 2.value}}"} ] } }

元の内容を上書きせずにフィールドを編集する場合:

オプション 1

  • [課題を編集] アクションを追加します

  • [フィールドを選択] オプションで更新するフィールドを選択します

  • スクリーンショットのように、次のオプションのリストを入力します。

    • {{issue.Select List Multiple Choices}}

    • {{issue.Select List Single Choice 1}}

    • {{issue.Select List Single Choice 2}}

オプション 2

  • [課題を編集] アクションを追加します

  • [その他のオプション] の設定を展開します

  • 次の JSON 式を使用します (フィールド名に基づいて、必ず更新してください)。

{ "update": { "Select List Multiple Choices": [ {"add": {"value":"{{issue.Select List Single Choice 1.value}}"}}, {"add": {"value":"{{issue.Select List Single Choice 2.value}}"}} ] } }

シナリオ 3 - "選択" フィールド (複数選択) を別の "選択" フィールド (複数選択) の内容で更新する

To replace the content of the field with values coming from another select field (multiple choices)

オプション 1

  • [課題を編集] アクションを追加します

  • [フィールドを選択] オプションで更新するフィールドを選択します

  • Enter the option {{issue.Select List Multiple Choices 2}}

オプション 2

  • [課題を編集] アクションを追加します

  • [その他のオプション] の設定を展開します

  • 次の JSON 式を使用します (フィールド名に基づいて、必ず更新してください)。

    { "fields": { "Select List Multiple Choices": [ {{#issue.Select List Multiple Choices 2}}{"value":"{{value}}"}{{^last}},{{/}}{{/}} ] } }

To edit the field without overwriting its original content

オプション 1

  • [課題を編集] アクションを追加します

  • [フィールドを選択] オプションで更新するフィールドを選択します

  • 次のオプションを入力します。

    • {{issue.Select List Multiple Choices 1}}

    • {{issue.Select List Multiple Choices 2}}

オプション 2

  • [課題を編集] アクションを追加します。

  • [その他のオプション] の設定を展開します。

  • 次の JSON 式を使用します (フィールド名に基づいて、必ず更新してください)。

    {"update": {"Select List Multiple Choices": [{{#issue.Select List Multiple Choices 2}}{"add": {"value":"{{value}}"}}{{^last}},{{/}}{{/}}]}}

シナリオ 4 - "選択" フィールド (複数選択) を "テキスト" フィールド (単一行) の内容で更新する

ここでは、次のように仮定します。

  • You configured a Single Line Text field that will be filled in with comma-delimited values (for example, "Option 1, Option 2, Option 3")

  • "テキスト" フィールドに記載されている値に基づいて、"選択" フィールド (複数選択) に入力しようとしています

To replace the content of the field with the values listed in the text field

  • [課題を編集] アクションを追加します。

  • [その他のオプション] の設定を展開します。

  • 次の JSON 式を使用します (フィールド名に基づいて、必ず更新してください)。

    { "update": { "Select List Multiple Choices": [ {{#issue.Select List Multiple Choices 2}}{"add": {"value":"{{value}}"}}{{^last}},{{/}}{{/}} ] } }

To edit the field without overwriting its original content

  • [課題を編集] アクションを追加します。

  • [その他のオプション] の設定を展開します。

  • 次の JSON 式を使用します (フィールド名に基づいて、必ず更新してください)。

    { "update": { "Select List Multiple Choices": [ {{#issue.Text Field Single Line.split(",")}}{"add": {"value":"{{.}}"}}{{^last}},{{/}}{{/}} ] } }

更新日時: September 25, 2025

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

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