Add users from Asset attribute as request participants

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

Summary

This document details how to automate adding multiple users as request participants based on an asset's attributes.  It covers the process of configuring the automation to include them in relevant requests.

Automation's behavior with user Asset attributes

When using automation to copy users to an issue field from an assets object attribute, only the first user is copied if the attribute holds multiple users.

This happens because the smart value for the assets object attribute returns an array when multiple users are in the attribute.

Configure Automation to add multiple users as participants

  1. In your automation, create a variable where you will store the users from your assets object user attribute; in the below example, the asset attribute that stores the users is called Owners, so the smart value is {{issue.customfield_####.Owner}} 
  2. In the Edit issue action, use additional fields and JSON along with list smart value operations to update the field:
    A screenshot of a web form titled Edit issue. It allows setting values for fields on the issue. A dropdown labeled Choose fields to set... is at the top. A More options section is expanded, with a checked checkbox labeled This rule should send emails. Rule actor must be an admin or project admin. Below that is a text area labeled Additional fields containing JSON code for updating request participants, seemingly adding participants based on a previously defined variable. A link to documentation on JSON objects is provided. Icons for a new branch, deleting the rule, and help are in the top right corner.

    JSON
    {
        "update": {
            "Request participants": [
                {{#Participants.substringBetween("[","]").split(", ")}}
                    { "add":
                        { "accountId": "{{.}}" }
                    }
                    {{^last}},{{/}}
                {{/}}
            ]
        }
    }
  3. In this example, we're updating the 'Request Participants' field, and our variable is called Participants; make sure to change it to match your environment.
Last modified on Feb 12, 2025

Was this helpful?

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