Add/Update/Remove Request Participants using Automation

Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.

If you are looking for a solution for Jira Data Center, please refer instead to the KB article Automation for Jira - How to update the Request Participants or a multi user picker field from the content of other fields

Summary

In Jira Service Management Cloud, we can add Request Participants so they can view and receive notifications about specific tickets. On this documentation, you will find alternatives on how to add them using Automation.

Append/Add multiple Request participants using the Edit issue action

Once you have configured the Automation rule trigger and defined the conditions under which Request participants should be added, you can choose one of the options below to add participants to the issue.

Choosing a user from the list 

  1. Click on "Choose fields to set..." and type "Request participants".

  2. Enable the checkbox for the "Request participants" field (as in the screenshot below).

    Screenshot of the Jira Edit issue dialog box. The user is setting values for fields on the issue. The Request participants field is checked, and the Request Type field is unchecked. Instructions indicate that more fields can be added, and advanced field editing is available via More options. Save and Cancel buttons are visible.

  3. Click on the "Request participant" field dropdown and start typing the name to search for users. 

  4. To add more users click again on the field and find a new user.


    Append to existing list

    To Append the new users, from the Request participant dropdown choose the option "Copy from issue" followed by selecting the new list of users

Copying users from other single user or multi-user picker fields

  1. Click on "Choose fields to set..." and type "Request participants".

  2. Enable the checkbox for "Request participants" field. 

  3. Click on three dots near the "Request participant" field and choose option "Copy from" 

  4. Then click on "Add Request participants from Current Issue" and you will see the options to select the Issue and the Field to copy the values from. 

    Append to existing list

    You can check/uncheck the "Add to existing values" option to keep or remove the current Request participants value.

Using the JSON advanced field editing

  1. Expand the More Options section below the "Choose field to set..".

  2. Also, make sure you have not checked the Request participant field under "Choose fields to set.." 

  3. Here are a few JSON you can insert under Additional fields to update Request participant as per your requirement: 

    Add/remove single and multiple account Id's

    To add a single account, use the below JSON: 

    Single account
    {"update": {
      "Request participants": [
       {
        "add": {"id":"<accountId>"}
       }
      ]
     }
    }

    To add multiple accounts, use the below JSON: 

    Multiple accounts
    {"update": {
      "Request participants": [
       {
    	"add": {"id":"<accountId>"}
       },
       {
    	"add": {"id":"<accountId>"}
       }
      ]
     }
    }

    (warning) To remove single or multiple accounts, replace the keyword add with remove in the same JSON shared above.

    (info) The <accountId> should be substituted by the accountId of the user you wish to add/remove. 
    (info) In case you have duplicated Request participants fields you can use "customfield_xxxx" instead of "Request participants" where xxxx is the id of the custom field "Request participants". Here is how-to find custom field id.

    Copy from another field - Single and multiple accounts

    To copy a participant from another field, you can use below JSON:

    Single account
    {"update": {
     "Request participants": [
       {
        "add": {"id":"{{issue.Approvers.accountId}}"} 
       }   
      ]   
     } 
    }

    To copy values from another multi-user picker field use the below JSON:

    Multiple accounts
    {"update": {
      "Request participants": [
       {{#issue.Approvers}}{"add": {"id":"{{accountId}}"}}{{^last}},{{/}}{{/}} 
      ]
     } 
    }

    To copy values from two different multi-user picker field use the below JSON:

    Copy from multiple fields
    {"update": {
      "Request participants": [
       {{#issue.Approvers1}}{"add": {"id":"{{accountId}}"}}{{^last}},{{/}}{{/}},
       {{#issue.Approvers2}}{"add": {"id":"{{accountId}}"}}{{^last}},{{/}}{{/}}
      ]
     } 
    }
  4. Once all users were added click the Save button. 

For more examples, refer to the page Advanced field editing using JSON.

Append/Add multiple Request Participants using the Send web request action 

Review the RestAPI add request participants documentation and how-to send web request using automation for Jira for additional information.

Below is "Send web request action" details:

  1. In Web request URL put the htttps://<your-sitename>/rest/servicedeskapi/request/{{issue.key.urlEncode}}/participant 
  2. Add the following headers: 
    Accept: application/json
    Content-Type: application/json
    Authorization: Basic emailaddress:APItoken
    (warning) In the Authorization header make sure that you add the keyword Basic followed by the base64 of your emailaddress:APItoken.
    So if the base64 of the emailaddress:APItoken is AB12XY45 then to the Authorization header add the value Basic AB12XY45
  3. HTTP method: POST 
  4. Web request body: Custom data

    Custom data: insert JSON as per recommendations from RestAPI documentation above. 
    JSON sample: 

    {"accountIds": [ 
      "<accoundId>", 
      "<accoundId>"
     ]
    }

    The <accountid> should be substituted by the accountId of the user you wish to add. Below is a sample of the "Send web request" action:
    A screenshot of a Jira automation rule action configuration for sending a web request. The form includes fields for the web request URL (pointing to an Atlassian Service Desk API endpoint), headers (Accept, Content-Type, Authorization), HTTP method (POST), web request body, and custom data containing JSON with accountids. There's also an option to wait for a response before executing subsequent rule actions.

  5. Click Save button. 


Last modified on Feb 6, 2025

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.