I am using a really simple REST endpoint and its corresponding fragment and it is not working for me.
The fragment I created is the following:
Here is the error that I get printed in the log:
2022-08-17 00:00:40,405+0200 https-openssl-nio-443-exec-297 ERROR mouh 0x69166x26 nxp314 10.248.27.109 /rest/scriptrunner/behaviours/latest/validators.json [c.o.jira.behaviours.BehaviourManagerImpl] Script function failed on issue: issue: PIE-68635, user: mouh, fieldId: __init__, file: <inline script>, edit behaviour: https://itrac-dev.eur.ad.sag/plugins/servlet/scriptrunner/admin/behaviours/edit/15, https://itrac-dev.eur.ad.sag/plugins/servlet/scriptrunner/admin/behaviours/edit/17, https://itrac-dev.eur.ad.sag/plugins/servlet/scriptrunner/admin/behaviours/edit/212022-08-17 00:00:40,405+0200 https-openssl-nio-443-exec-297 ERROR mouh 0x69166x26 nxp314 10.248.27.109 /rest/scriptrunner/behaviours/latest/validators.json [c.o.jira.behaviours.BehaviourManagerImpl]
Here is the code for the REST endpoint, the code is super simple as you can tell:
import com.onresolve.scriptrunner.runner.rest.common.CustomEndpointDelegateimport groovy.json.JsonBuilderimport groovy.transform.BaseScriptimport javax.ws.rs.core.MultivaluedMapimport javax.ws.rs.core.Response@BaseScript CustomEndpointDelegate delegatecallMounaSubTaskCreator( httpMethod: "GET", groups: ["jira-administrators"] ) { MultivaluedMap queryParams, String body -> return Response.ok(new JsonBuilder([abc: 42]).toString()).build() }