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

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 :-)

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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

77 views 0 5
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