Thanks @ibuchanan for testing it out!
Compare our payloads, the value format of accountId are different. Your accountId is 557057:3d0e64ae-35d3-490d-b6d9-d81c981476d0
, my accountId is 61fa7a56f5f5b80070c78e2c
. This maybe the root cause. How did you get the accountId?
Reproduce steps:
- Create a request which contains the single_user_picker and multi_user_picker custom fields in Jira Service Management UI.
- Fill values for these two fields in this request on UI.
- Read this request by Postman (GET /rest/servicedeskapi/request/{{issueIdOrKey}}). I got below response.
......
{
"fieldId": "customfield_10784",
"label": "rtm_custom_user_picker_single_user",
"value": {
"self": "https://az-dev.atlassian.net/rest/api/2/user?accountId=61fa7a56f5f5b80070c78e2c",
"accountId": "61fa7a56f5f5b80070c78e2c",
"avatarUrls": {
"48x48": "https://secure.gravatar.com/avatar/c0204e3188127149a40195fbbd4f8bfa?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FFL-6.png",
"24x24": "https://secure.gravatar.com/avatar/c0204e3188127149a40195fbbd4f8bfa?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FFL-6.png",
"16x16": "https://secure.gravatar.com/avatar/c0204e3188127149a40195fbbd4f8bfa?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FFL-6.png",
"32x32": "https://secure.gravatar.com/avatar/c0204e3188127149a40195fbbd4f8bfa?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FFL-6.png"
},
"displayName": "first14 last14",
"active": true,
"timeZone": "America/Los_Angeles",
"accountType": "atlassian"
}
},
{
"fieldId": "customfield_10783",
"label": "rtm_custom_user_picker_multiple_users",
"value": [
{
"self": "https://az-dev.atlassian.net/rest/api/2/user?accountId=61fa7a56f5f5b80070c78e2c",
"accountId": "61fa7a56f5f5b80070c78e2c",
"avatarUrls": {
"48x48": "https://secure.gravatar.com/avatar/c0204e3188127149a40195fbbd4f8bfa?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FFL-6.png",
"24x24": "https://secure.gravatar.com/avatar/c0204e3188127149a40195fbbd4f8bfa?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FFL-6.png",
"16x16": "https://secure.gravatar.com/avatar/c0204e3188127149a40195fbbd4f8bfa?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FFL-6.png",
"32x32": "https://secure.gravatar.com/avatar/c0204e3188127149a40195fbbd4f8bfa?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FFL-6.png"
},
"displayName": "first14 last14",
"active": true,
"timeZone": "America/Los_Angeles",
"accountType": "atlassian"
},
{
"self": "https://az-dev.atlassian.net/rest/api/2/user?accountId=61fa7ad2f5f5b80070c78e5e",
"accountId": "61fa7ad2f5f5b80070c78e5e",
"avatarUrls": {
"48x48": "https://secure.gravatar.com/avatar/e5570dab7d159f4f389fb10dad6d11f1?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FRJ-6.png",
"24x24": "https://secure.gravatar.com/avatar/e5570dab7d159f4f389fb10dad6d11f1?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FRJ-6.png",
"16x16": "https://secure.gravatar.com/avatar/e5570dab7d159f4f389fb10dad6d11f1?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FRJ-6.png",
"32x32": "https://secure.gravatar.com/avatar/e5570dab7d159f4f389fb10dad6d11f1?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FRJ-6.png"
},
"displayName": "rubin jin",
"active": true,
"timeZone": "America/Los_Angeles",
"accountType": "atlassian"
},
{
"self": "https://az-dev.atlassian.net/rest/api/2/user?accountId=61fa7ad9530d2a00714713b1",
"accountId": "61fa7ad9530d2a00714713b1",
"avatarUrls": {
"48x48": "https://secure.gravatar.com/avatar/0b849ba56780beb3e8fb1627e3d7f088?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FTL-6.png",
"24x24": "https://secure.gravatar.com/avatar/0b849ba56780beb3e8fb1627e3d7f088?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FTL-6.png",
"16x16": "https://secure.gravatar.com/avatar/0b849ba56780beb3e8fb1627e3d7f088?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FTL-6.png",
"32x32": "https://secure.gravatar.com/avatar/0b849ba56780beb3e8fb1627e3d7f088?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FTL-6.png"
},
"displayName": "test4 last5",
"active": true,
"timeZone": "America/Los_Angeles",
"accountType": "atlassian"
}
]
},
......
- Copy the accountId to the create_request request body, call the API by Postman (POST /rest/servicedeskapi/request). The request body is as blow:
{
"requestFieldValues": {
"summary": "test bug 2",
"customfield_10784": {
"accountId": "61fa7a56f5f5b80070c78e2c"
}
},
"serviceDeskId": "19",
"requestTypeId": "203"
}
Got 400 error.
{
"errorMessage": "Your request could not be created. Please check the fields have been correctly filled in. Please provide a valid value for field 'rtm_custom_user_picker_single_user'",
"i18nErrorMessage": {
"i18nKey": "sd.validation.request.creation.failure.required.field",
"parameters": [
"Please provide a valid value for field 'rtm_custom_user_picker_single_user'"
]
}
}