I have a file called helperfunction.groovy which have many functions. This file is used by many postaction scripts. In each of the scripts, I have imported the file and Used it like following :
//Import helper functions
File helperFunctionsFile = new File("/var/application-data/jira/postaction/HelperFunctions.groovy");
Class helperFunctionsgroovyClass = new GroovyClassLoader(getClass().getClassLoader()).parseClass(helperFunctionsFile);
GroovyObject helperFunctions = (GroovyObject) helperFunctionsgroovyClass.newInstance();
I would like to use this GroovyObject called helperFunctions in such a way that, it would be loaded during the startup of jira server and I can use it in any postaction scripts without reloading it. I want to use functions inside the file in as many postaction scripts as possible during the transition of issues from one transition to another.