I'm trying to get the options for a Select List (single choice) field from a Json formatted file but I can't find any example. The options may change daily so I can't rely on a static list.
The following one is similar, it's a Script Field, but the data comes from a REST API.
https://docs.adaptavist.com/sr4js/8.35.0/features/script-fields/built-in-script-fields/custom-picker
It works well as is, so I would like to know if we could plug a Json interface rather than using a REST API interface.
We are working with :
JIRA - 9.12.1
Adaptavist ScriptRunner for JIRA - 8.35.0
My skill level in JIRA/ScriptRunner/JAVA/Groovy is novice.
Thanks,
JF
Hi,
Where your json file will be kept ? The REST API return a JSON, so in your case the file is somewhere on a drive? locally ?
I think the script field could be the solution, you just have to tell to your script where to look for the JSON.
Hi,
The example I was referring to is already in Script Field, I know I'm on the right path. It's just that I can't find any information about these "search, toOption, PickerOption(), getItemFromId, renderItemViewHtml and renderItemTextOnlyValue".
The Json formatted file would reside under the Jira scripts folder.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.