Automation for Jira : JSON update multi user picker

Purevdorj Nyamdorj November 8, 2022

Hi, everyone 

Currently I am struggling with Jira Automation tool with updating multi user picker field.

Query is simple. When condition met then multi-user picker field will be updated automatically. (means add people on current picked users ) 

is there anyone who can help me ?

Regards,

Purevdorj

I have tried this but no idea how to find account id.

{
"fields": {
"customfield_10210":[ { "id":"accountid" }]
}
}

1 answer

1 accepted

1 vote
Answer accepted
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.
November 8, 2022

Hi @Purevdorj Nyamdorj 

First, are you trying to add values or replace all existing ones?  If you are trying to add, please see this example for another multi-select user field: https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/#Request-participants

Next, are you trying to set a user from another issue user field, such as assignee, or for a specific user?

  • If from another field, access the smart value from the field like this: {{issue.assignee.accountId}}
  • If for a specific user, you could find their accountId by performing a JQL search with a user name, and Jira will replace the value with the accountId in the query.  Then you may use the value in your rule.

Kind regards,
Bill

Purevdorj Nyamdorj November 8, 2022

Hi @Bill Sheboy 

Yes, I am trying to add values. I have tried to find accountID by searching but I could not find. Is there something wrong ? any other ways to find accountID ?

Regards,

Purevdorj

search.JPG

Purevdorj Nyamdorj November 8, 2022

Also, i have tried this 

{
"fields": {
"customfield_10210":[ { "id":"92c8a499-542a-45e3-b43a-aebcbfba618e" }]
}
}

but even audit log says success, this custom field is missing in new issues. I got external_id number from database. 

Regards,

Purevdorj

Purevdorj Nyamdorj November 8, 2022

Seems I was trying something wrong. Its working fine. Thanks @Bill Sheboy 

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer