Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Set customField of User Schema Type via API (manager Picker)

Rajesh Ale June 12, 2024

Hi,

we have a customfield which is of user schema type and am trying to populate that via API. 

But unfortunately its accepting only accountId and not name,emailAddress or any other.. 

The issue is to populate that field, I need to make one call to get accountId of that user and then make another call. (Don't want to make multiple calls) 


Working:

  "customfield_12007": { "accountId": "5af0ec83eee87f2exxxx"}


any alternative way to populate in one single Api call.  

1 answer

0 votes
Vijay Dadi
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.
June 17, 2024

Hello,

 

The custom field which is of user schema type, yes it always takes the user account id as input but that is how it is working.

 

You can have an automation to make web request to user.

https://<JIRAURL>/rest/api/3/user/search?query={{object.Email}}

 

then you can use the response to set account id.

 

"customfield_12007": { "accountId": "{{webResponse.accountid}}"}

Hope this helps !

Suggest an answer

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

Atlassian Community Events