Add request participants from object attributes without removing existing values

Platform Notice: Cloud Only - This article only applies to Atlassian apps on the cloud platform.

Summary

Update the Request Participants field and add a single or multiple values from the Objects attribute without removing previous values.

Solution

In the automation rule

  1. Add the desired trigger.

  2. Add a conditional (Work item fields condition) to verify if the custom object field isn’t empty.

  3. Use the Create a variable action to store the users from the assets object user attribute.

    {{issue.customfield_####.”<Attribute Name>”.accountId}}
  4. Create another variable to calculate the number of users in the object’s attribute.

    1. The array of users is between two square brackets, so we need to extract the list of user’s account IDs using the function substringBetween(String open, String close): substringBetween("[","]").

    2. The user's account IDs are separated by a comma followed by a space, thus we need to split the list into an array of values containing only account IDs using the function split(String separator): split(", ").

    3. Having an array of account IDs, we can know how many values the object’s attribute has using the function list.size.

    4. Knowing the number of values, we can add a condition block of IF or ELSE: Add condition options to check whether the object’s attribute has more than one value.

      1. If: The {{Number}} smart value is greater than 1.

      2. Add an Edit work item action, use additional fields and JSON along with list smart value operations to update the field:

        { "update": { "Request participants": [ {{#Participants.substringBetween("[","]").split(", ")}} { "add": { "accountId": "{{.}}" } } {{^last}},{{/}} {{/}} ] }
      3. If another custom field needs to be updated instead of the Request Participants field, the following JSON will update the users in the custom user field.

        { "update": { "customfield_XXXXX": [ {{#Participants.substringBetween("[","]").split(", ")}} { "add": { "accountId": "{{.}}" } } {{^last}},{{/}} {{/}} ] } }
    5. Else

      1. Add an Edit work item action, use the Choose fields to set… dropdown and select the required custom field to be updated, whether it is the Request Participants field or another custom field. In the field to be updated, add Copy from work item and the {{Participants}} variable previously created.

Updated on September 25, 2025

Still need help?

The Atlassian Community is here for you.