How to clear & set user picker field using JSON

Reid Bourgeois October 19, 2021

Using automation, I would like to clear a user picker custom field (that has a default value) and set it to another user when certain criteria is met. Here's what I have: 

{

"update": {
"IT Approvers" : [
{
"remove": {
"accountId":"5ef9e6eea115ac0bb522xxxx"
}
}
{
"add": {
"accountId":"5dc32c445678870df715xxx"
}
}
]
}
}

 

I'm receiving this error: Error while parsing additional fields. Not valid JSON.

 

Can someone please tell me how to clear the first user from the field? Adding is working as expected. 

 

1 answer

1 vote
Bill Sheboy
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.
October 19, 2021

Hi @Reid Bourgeois 

Have you tried using the attribute name "id" instead of "accountId", like in the documentation: https://support.atlassian.com/jira-software-cloud/docs/advanced-field-editing-json/#Advancedfieldediting-JSON--Requestparticipants

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer