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

Michael Davison 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

1 vote
Answer accepted
Michael Davison 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 March 28, 2023

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 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