Forums

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

Scriptrunner endpoint rest: script location

Marc Minten (EVS)
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.
May 4, 2017

I created a new Custom REST endpoint, and entered the location of my script file. My script file is located in a sub-folder of my scripts root folder, and I use a relative path to my scripts root. Type checking says the file can be found, and I can save the custom endpoint. But when running the REST call, I get an error: when looking the error I see it tries to find my script under the scripts root, NOT under the relative path I entered.

Is this a Bug ? A known limitation ?

When I put the script file directly under the script root folder (and just give the name of the script in the Custom REST Endpoint screen), evrything goes fine! My REST Endpoint is saved and the REST call is working correctly...

 

 

2 answers

1 accepted

2 votes
Answer accepted
JamieA
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.
May 12, 2017

The package declaration needs to be correct - if not there should be an error logged.

So if you have script foo/bar/thing.groovy it needs to begin:

package foo.bar

// etc

 

Marc Minten (EVS)
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.
May 12, 2017

Hi Jamie,

Oups, indeed, thats the problem. I must have seen this by myself :-(

Thanks for you reply.

@Daniel, thanks for your reply too :-)

0 votes
Daniel Yelamos [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.
May 12, 2017

Hello Marc.

I'm trying to reproduce this, but I haven't been able to. Could you please provide the full error you are getting, your Jira version, and your Scriptrunner version?

Thanks in advance

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events