Hey together,
so I'ld like to develop and automate some custom workflows and we're using Scriptrunner for this.
The configuration:
JIRA: 7.3.7
Scriptrunner: 5.0.4
Other plugins such as LabelManger
Developing and debugging over IDEA against a localhost-Installation
Now, so far it's working good but I'm having some general issues with importing other classes or plugins. Autocomplete works when the jar is referenced. However, when triggering the execution, it's always responding with "Unable to resolve class" for the external class. This is even the case for my own custom classes that're placed below the main script in the directory.
-MainScript
+HelperDirectory
+-HelperClass
Some exemplaric code I'm using:
...
import com.onresolve.scriptrunner.runner.customisers.PluginModule
import com.onresolve.scriptrunner.runner.customisers.WithPlugin
import com.almworks.jira.structure.AllPublicStructureComponents
// Specify that classes from this plugin should be available to this script
WithPlugin("com.almworks.jira.structure")
// Inject plugin module
PluginModule
AllPublicStructureComponents structureComponentsNote: I'm not sure if the documentation is outdated on that, but I can't find an actual "API" folder in the actual version of Structure.
I'm able to load at least my own classes with a construct like this but it's really uncomfortable and I'm loosing stuff like autocompletion:
File sourceFile = new File("D:\\Programming\\Idea\\ScholledevJIRAScriptrunner\\src\\main\\scholledev\\HelperClasses\\BBCodeBlockLibrary.groovy");
Class groovyClass = new GroovyClassLoader(getClass().getClassLoader()).parseClass(sourceFile);
GroovyObject stringMapLibClass = (GroovyObject) groovyClass.newInstance();Is this an actual issue with Scriptrunner or am I doing something fundamentally wrong?
Greetings Marcus