Scriptrunner endpoint rest: script location

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

This widget could not be displayed.

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

 

Hi Jamie,

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

Thanks for you reply.

@Daniel, thanks for your reply too :-)

This widget could not be displayed.

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
Community showcase
Published Aug 22, 2018 in Marketplace Apps

How a Marketplace app tech team is achieving gender diversity

Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...

512 views 3 18
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you