Status: To Do
When you install the resulting custom plugin jar after you have finished making your custom script plugin the auto-completion does not show for the scripts contained inside it, however, the scripts can still be used if you know the path to the script. (This will essentially be the package name used in the script with / instead of the .)
If you use the jira:debug maven goal to run Jira and test your scripts, when searching for scripts in the user interface it looks like it auto completes the paths to your scripts inside `/jira/src/main/resources/` (for the Jira module), however, these paths only show because you run jira:debug and they will not show when you actually install the finished plugin as a jar.
Steps to reproduce
- Clone the samples repository
- Open it up in IntelliJ
- Add a script to /jira/src/main/resources/ inside a sub folder structure like `/jira/src/main/resources/com/myscripts/` and make sure that script uses a package of `com.myscripts`
- Compile the custom plugin. e.g: run `atlas-package`
- Take the jar that will be found in the target directory target/sr-sample-plugin-jira-1.1-SNAPSHOT.jar and upload this to an instance of Jira running ScriptRunner that is not run with jira:debug.
- Go to the script console and try to auto-complete the file path by typing com
The path will auto-complete to show the next folder `myscripts` and then after selecting that it will show the filename of your script.
The path does not auto-complete
Manually put the full path to the file into the script console and it should then run the script correctly. The path will be the package name but replace the `.` character with the `/` file separator.
- is duplicated by
SRPLAT-2276 Script Plugins are not available as script roots outside of development environment
- is related to
SRPLAT-2277 mvn verify step does not work for Script Plugins
- To Do