Adding users to custom field post-function

philipf
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 29, 2024

I had an automation set that whenever a ticket was transitioned to 'approved' status that 3 users would be added to a custom user field called 'stakeholders'.

I however have to turn this off because that stakeholder field is cleared during the automation and I need these new names to just be appended. I don't see how to do this with the automation. Maybe there is a way, if so I am all ears.

I thought I could use the workflow and specifically post-functions to update the 'stakeholder' field and have it append by clicking the button.

 

My question is, what value do I enter in the custom field box for the three users that need to be appended to the field.?

Is it their user name, accountID, do i seprate them with commas?

1 answer

1 accepted

5 votes
Answer accepted
Samuel Gatica _ServiceRocket_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 29, 2024

Hi @philipf 

To append users to a custom user field (like 'stakeholders') without clearing existing values, you can use Jira Automation advance edit (JSON) with the appropriate smart values.

{
    "update": {
    "stakeholders": [
            { 
"add": { "id":"{{user1.accountId}}"},
"add": { "id":"{{user2.accountId}}"}
}  ]
    }
}

Using Workflow Post-Functions

Using account IDs is generally more reliable as user names can change, whereas account IDs remain consistent. You can find the account IDs by navigating to the user management section in Jira and checking each user’s details.

 

Hope this helps!

 

Best regards

Sam

Hans Polder _Devoteam_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 29, 2024
philipf
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 31, 2024

thanks guys

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events