Snippets

Adaptavist Set Single User-Picker cf

Created by Joaquin Fernandez last modified
// specify the issue key here for the issue to update
def issueKey = "issue key"
// Specify the id for the user picker custom field here
def userPickerField = "customfield_XXX"
// specify the account ID of the user to add 
def userAccountId = "XXXXXXXXXXXX"
def result = put("/rest/api/2/issue/${issueKey}") 
.header('Content-Type', 'application/json') 
.body([
fields:[
(userPickerField): [id: userAccountId]
]
])
.asString()

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.