Hi,
Using the rest end point and behaviour scriptrunner i was able to convert a text field into dropdown list which fetches the values using rest call. As in the link: https://scriptrunner.adaptavist.com/4.3.6/jira/behaviours-conversions.html#_walkthrough_external_rest_service
Script used:
getFieldByName("textfield").convertToSingleSelect([
ajaxOptions: [
url : getBaseUrl() + "/rest/scriptrunner/latest/custom/query1",
query: true,
formatResponse: "general"
]
])
This works perfectly.
I want the same functionality with single select list field.
i am trying with below script,
getFieldByName("selectlist").setFieldOptions([
ajaxOptions: [
url : getBaseUrl() + "/rest/scriptrunner/latest/custom/query1",
query: true,
formatResponse: "general"
]
]) .
The field displays [Object Object].
How to display the options in the select list field?