Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Updating Approvers in Help Desk via ScriptRunner Cloud


Trying to update the default approver field that comes with Help Desk. For my instance of JIRA Cloud the custom field is 'customfield_10029'. I attached a screenshot of the structure and my script listener below. The script listener isn't throwing any errors but it isn't setting the approver field either. I've tried the same script with another user pick list and it works as intended. Would definitely like to leverage the "Approver" field instead of another user pick list. 

I thought I was matching the structure of the custom fields properly, but when the script is triggered the approver field isn't being set properly. 

How can I properly set the approver field via scriptrunner? 


Structure of customfields:

Screen Shot 2018-02-26 at 18.35.25 PM.png

Screen Shot 2018-02-27 at 11.36.00 AM.png 

Script Listener:

def approverID = 'customfield_10029'
def approvalsID = 'customfield_10015'
def userApprover = ""

def value1 = issue.fields.customfield_16125.value as String
if (value1 == "Santa Claus"){
userApprover = "santa"
} else {
userApprover = "joe"

.header("Content-Type", "application/json")
name: userApprover
(approvalsID): [{
canAnswerApproval: true
approvers: [{
name: userApprover

Edit: Realized that a second custom field is attached the approver field for helpdesk.


1 answer

1 accepted

0 votes
Answer accepted

Hi Ryan,

Unfortunately the Approvers field is a locked field owned by the Jira Service Desk.

Service desk fields need to be updated using the Jira Service Desk Cloud Rest API located  here, however unfortunately there is no rest call provided to update the Approvers field which means that it cannot be set using ScriptRunner for Jira Cloud. 



Thanks Kristian,

Appreciate the help! 


For those that run into a similar problem, as a workaround I created a custom user picker field. Set that user field for the approver at the step in the workflow and setting the value with Scriptrunner. 

@Ryan Yoshioka 
What is the structure to be used to update a User Picker field?

I am a new user and I am I little confuse how to update it.

I am using the structure below for testing, the reporter I was able to set the user by using the AccountID field, but for the CF customfield_11410 it is removing the user and leaving it blank.

My goal is to be able to add multiple users inside a multiple user picker custom field.

Screen Shot 2020-06-14 at 5.39.22 PM.png

Hi Joao,

I can confirm we have an example script located here which can be run on the Script Console as the ScriptRunner add on user and shows how to set a Multi User Picker field by passing the array of users account ID's and you will be able to use this script as a reference guide to help you create the script that you require. 

I hope this information helps.



It seems that the example above does not work for setting the Approver inside of Service Desk. Is there still no way to do this in jira cloud?



Suggest an answer

Log in or Sign up to answer

Atlassian Community Events