I would like to make a ScriptRunner script plugin for Jira, that is, a plugin that includes some scripts that I can run from ScriptRunner. I am building on the sample plugin talked about here: https://docs.adaptavist.com/sr4js/latest/best-practices/write-code/set-up-a-dev-environment
The thing is it doesn't fully work, as you can see in the following screenshot. I created a class called com.xeridia.Example that takes an org.apache.log4j.Logger and prints the current date. Technically it works, seeing as you can see the date printed on the log below, the problem is whenever I import the class or reference the file of that class, an error always shows up that the file, the package or the class doesn't exist.
Although the code is working, I need to get rid of these errors, as they more than often confuse my developers and they thing they're doing something wrong.
Is it possible?
Thanks.
Just to muddle through, I'll answer myself. It seems like the @WithPlugin directive sort of solves the problem.
However, there still seems to be a bit of a problem with ScriptRunner's script roots. It seems like it can execute the scripts correctly, but says it can't find them under the script roots:
Also, there is no inkling whatsoever as to the script roots that were newly added by my script plugin throughout the ScriptRunner configuration.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.