Hi,
We are trying to set a custom field User Picker (Single User) using scriptrunner.
We tried email or accounID but still the Reporting Manager field User Picker (Single User) is not updating.
This is what I noticed, when there is a user already set in the Reporting Manager field, the value will be blank when we run the script.
def customfieldID = 'customfield_10202' // Reporting Manager
//def newFieldValue = 'mark@email.com'
def newFieldValue = '123456%3A6f714ab0-e00b-000e-0000-0000c7d000000' //accountid
def issueKey = 'FAC-152'
def result = put("/rest/api/3/issue/${issueKey}")
.header('Content-Type', 'application/json')
.body([
fields: [
customfieldID: [
id: newFieldValue
]
]
//]).asObject(Map)
]).asString()
if (result.status == 204) {
return 'Success'
} else {
return "${result.status}: ${result.body}"
}