I am currently stuck with a problem regarding the ScriptRunner REST endpoint Response.
I have a script that if finished correctly should send a notification response to the user.
This works as expected, if the time required for the script to run is about 5 seconds.
Due to some reasons the script can take up to several minutes to run.
If it does, then the UI does not show the Response of the Script REST endpoint.
The Response is defined like the following:
def flag = [
type : 'success',
title: "S3 REST endpoint",
body : "Test"
To analyse the problem with the script running longer I checked the logs by putting
before the Response. It shows the flag correctly but the response is not visible in the UI.
Is there some sort of Jira limitation I am not aware of?
Flags are not well suited for long-running tasks. Your browser will give up before you get a response default browser timeout).
Ideally, some sort of UI that provides a progress bar would be best. But that' not something that's available from scriptrunner.
What you might do is send the processing of your long-running task into a separate thread and return a flag that says "task is started". And perhaps provide some other ways to alert the users when it is finished (maybe via email notification).
Hello everyone! We are very excited to announce some much needed changes to the issue create experience in JSM (the blue "create" button) at the top of the screen. We have just starte...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events