On cloud you should always use accountId when it comes to a user field. In this case for a multipicker field that should be:
'{"fields": {"customfield_12904": [{"accountId": "5abcXXX"}]} }'
Yes, by sending accountId it worked. but generally I get emailAddress , is there a way for JIRA to pick accountId automatically ??
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You will need to create some sort of datastore that relates an accountId to an emailAddress and call that from a function. On cloud, emailAddress is an object that is restricted based on the users' preference, so you do not want to rely on that object.
In terms of multi-picker fields, if you want to append users
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Rajesh Ale
Welcome to the community 🙂
Better Get the Issue from API, you'll have the format to edit the custom field via API that you need to be reflected in Jira
First make a GET call to Issue. Take a look at the format and use the same white editing (POST) the issue
Let me know if that works
Thanks,
Pramodh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the welcome.
You just wanted to welcome me by commenting or do you really know the solution ??
This is what i get from get issue.
{
"customfield_12904": [
{
"accountId": "123111515",
"emailAddress": "abc@abc.com",
"displayName": "abc",
"active": true,
"timeZone": "Etc/GMT",
"accountType": "atlassian"
}
]
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here it is
Use this as a sample and let me know if it works
curl --request PUT \
--url 'https://your-site.atlassian.net/rest/api/3/issue/WSP-198' \
--user 'email:token' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{ "fields": { "customfield_10082": [{"value": "Apple"}, {"value": "Mango"}]}}'
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.