Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

ScriptRunner behaviour not populating Select List from REST Endpoint

Luke Munro
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 12, 2018

JIRA Service Desk (Server)

I have defined a behaviour to populate a text field with values from a REST endpoint.

Works fine when creating a standard JIRA ticket, but Service Desk fails to populate the field.

getFieldByName("Software Application").convertToSingleSelect([
ajaxOptions: [
url : getBaseUrl() + "/rest/scriptrunner/latest/custom/sccmApplicationsQuery",
query: true,
minQueryLength: 0,
keyInputPeriod: 500,
formatResponse: "general",
]
])

 

JS error

[SR Behaviours] Error retrieving validators TypeError: Cannot read property 'extend' of undefined
at Object.a (batch.js?locale=en-AU&sd_operational=true:formatted:29340)
at t.e.addFieldListeners (batch.js?locale=en-AU&sd_operational=true:formatted:28187)
at batch.js?locale=en-AU&sd_operational=true:formatted:28403

 

I'm able to set other properties on the field as per fix in https://productsupport.adaptavist.com/browse/SRJIRA-2545

e.g.

  • setHelpText
  • setReadOnly
  • setFormValue

1 answer

0 votes
Viktor Kuzmychov
Contributor
April 3, 2020

Hi Luke,

Just ran into same issue. Did you figure this out?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events