Hi!.
I'm trying to create a script with scriptrunner to be able to tansition two linked issues that, each from different projects. What I want is that when one of these issues goes to "done", the other one does it automatically.
¿Does anyone have an example of a script i can use?
¿Do i have to select a postfunction or a condition in scriptrunner?
I'm new in groovy and I'm lost!
Thanks!
What works for me is to include the form handling script inside the dialog string in the REST endpoint, instead of adding it as a resource. Before your form code, add the handling JS in <script> tags.
Also in the script block, for POST, try XMLHttpRequest
var xhttp = new XMLHttpRequest();
xhttp.open("POST", "${baseUrl}/rest/scriptrunner/latest/custom/restendpoint", false);
xhttp.setRequestHeader("Content-type", "application/json");
xhttp.send(JSON.stringify(payload));
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.