Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Scriptrunner REST endpoint not scanning custom package

Archana Bellamkonda May 2, 2020

Jira version: 8.5.1 (Data center)

Scriptrunner version: 5.8.0-p5

My script roots directory on the server (Linux) is /shared/home/scripts/ and /shared/home is our Jira shared home directory for our cluster (two nodes).

I created a custom package called com.test in script roots and have all my custom code in that package. I have an inline REST endpoint called "updateFromTest"

When ever I make any change to custom code, REST endpoint is not recognizing the changes. Is there a way to manually scan the package? Restarting Jira every time is very hard. I also added the following line to our setenv.sh script - 

JVM_SUPPORT_RECOMMENDED_ARGS='-Dplugin.rest.scripts.package=com.test'

 

Changes are not scanned even when I update the inline script - usually add/remove a space and update the REST endpoint, also tried to disable and enable the endpoint.

Is there any configuration that I am missing?

 

Thanks,

Archana

1 answer

0 votes
Benz Kek _Adaptavist_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 6, 2021

Hi Archana, the REST Endpoint follows the Java file hierarchy. 

If you put your script inside the package com.test, have you added the package shown below to your script as well? 

package com.test

import com.onresolve.scriptrunner.runner.rest.common.CustomEndpointDelegate
import groovy.json.JsonBuilder
import groovy.transform.BaseScript

import javax.ws.rs.core.MultivaluedMap
import javax.ws.rs.core.Response

@BaseScript CustomEndpointDelegate delegate

// then your code below

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.5.1
TAGS
AUG Leaders

Atlassian Community Events