As a ScriptRunner Admin,
I would like to dynamically show data from external systems,
So that the right data is added to my issues, ensuring accuracy and making it easier for my users
Pleaes comment with detailed use cases - they are very helpful!
It would be great if it would be possible to invoke a REST API towards an external 3rd party web site, collecting the data to be used within the behaviour.
An example would be to set the updated Customer name in a read-only field from an external DB when a Customer ID is set in a writable / selectable custom field
You could try to use fetch to achive this. As an example, I confirm that following snippet works to set the summary field:
const result = await fetch('<external rest api>', {
"method": "GET",
"headers": {
"Content-Type": "application/json"
}
}).then(res => {
return res.json();
})
getFieldById("summary").setValue("stringified result: " + JSON.stringify(result));