Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to append a user to a multi select user field in Jira Automation

Michael Davison
Contributor
April 7, 2022

I have an automation that checks for updates on a series of fields. I would like to append the initiator of the field changes to a multi-select user picker called Transport Approvers.

I wanted to use this Transport Approvers field to capture all users who initiate the field changes.  However when I run the automation, and test with different users, I can only write over the previous user in the Transport Approvers multi-select field only allows me to write over the previous value, not append an additional one to the field. 

Is there a way this can be done? Thanks in advance.

Screen Shot 2022-04-07 at 7.28.30 AM.png

2 answers

1 accepted

2 votes
Answer accepted
Michael Davison
Contributor
April 8, 2022

Using the advanced option, I added this code snippet and it works perfectly:

 

{
    "update": {
        "MultiUserPicker": [{
                "add": {"accountId":"{{initiator.accountId}}"}
        }]
    }
}

 Where "MultiUserPicker" is the name of my field.

Ilia Tsvetkov
Contributor
March 28, 2023 edited

This doesn't work for me. I have a multi-user field called "Contributors".

Screenshot 2023-03-28 141418.png

My json is identical to yours:

 

{
"update": {
"Contributors" : [{
"add": {"accountId":"{{initiator.accountId}}"}
}]
}
}

 

but I get this error 

Additional fields contains invalid field(s) in 'update' or 'fields' section: Contributors

 

Any ideas on what am I doing wrong? 

 

KR, Ilia

Melanie Muschick
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 5, 2023

If your field is a custom field, you most likely need to use its id like "customfield_12345"

Howell, Adrianna June 6, 2023

Did this correct the issue?

0 votes
Mayuresh Kamble September 11, 2023

Hi @Michael Davison ,

Could you please tell me how this solution can be implemented in Jira server.

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, confluence, loom, atlassian intelligence, ai notes, ai-powered meeting notes, atlassian community events, ace, confluence ai, loom ai integration, ai note-taking, atlassian ai features, team '25, atlassian live learning, confluence automation

Unlock AI-powered meeting notes: Join our live learning session! 📹

Did you catch the news at Team ‘25? With Loom, Confluence, Atlassian Intelligence, & even Jira 👀, you won’t have to worry about taking meeting notes again… unless you want to. Join us to explore the beta & discover a new way to boost meeting productivity.

Register today!
AUG Leaders

Atlassian Community Events