Hi - we are having trouble getting our custom JQL Function to appear/work in Jira. Using JIRA 6.2.7 and Script Runner 3.0.1. According to this:
There is a template, which we are not getting. We see the list of existing functions, but no button to "Add New Function". We do see a link where we can scan for recently added ones. But we are unsure of where to put our custom script in order for the Scan link to actually find it.
Any assistance is appreciated.
Online editing of JQL functions is not provided in 3.0 anymore - see Breaking Changes for+Custom+JQL Functions in 3.0.
hi - yes, i've seen that link. I guess the part I am missing is from this statement: "So the UI has been dropped in favour of just scanning your script roots for jql functions. If you create a new groovy file containing a JQL function under a script root, go to Admin -> Script Functions, and click the scan link (or you can restart jira). "
where do I find the default script root? Or if we've created our own, where is this configured?
Also, is there still a template file to use as a starting point?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Scripts root is usually {{$JIRA_HOME/scripts}}, so your JQL function should be placed in {{$JIRA_HOME/scripts/com/onresolve/jira.groovy/jql}} - as described in Template implementation is mentioned some lines below - https://gist.github.com/jechlin/11153983
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Finally! I got it to recognize my script. The IntelJ setup instructions are a bit out of date (and confusing - I've never used IntelJ before). It wasn't finding the groovyrunner.jar file (had to go back and add the top level $JIRA_HOME to the list of directories). Once past that, and created new directory $JIRA_HOME/scripts/com/onresolve/jira/groovy/jql for my script, I ran into https://jamieechlin.atlassian.net/browse/GRV-524. Which was easily fixed by renaming my class to match my script name. Thanks for the help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.