The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Script Runner 3.0 Custom Built-In Postfunctions

Ubisoft
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
September 22, 2014

Hello, 

 

We're running some tests on Script runner 3.0 and we're encountering problems in getting the custom builtin scripts to load properly in our JIra instance.  I seem to be implementing the package properly, but the documentation may be a bit misleading?  On the builtin script hacking page::

"have the script open in your IDE or text editor, make changes, then copy it out to one of the script roots"

 

But from the builtin script page:

"

The package name that your script/class must live in has changed from

oldnew
com.onresolve.jira.groovy.canned.workflowcom.onresolve.scriptrunner.canned.jira.workflow
for example:
com.onresolve.jira.groovy.canned.workflow.postfunctionscom.onresolve.scriptrunner.canned.jira.workflow.postfunctions

Note this also means the containing directory name must change."

Basically looking for clues as to where to keep hunting.  Should I be placing builtin postfunction class in the script root? (home/scripts)

or should I be putting it in the postfunctions folder? 

"com.onresolve.scriptrunner.canned.jira.workflow.postfunctions"

I've been trying both ways with no success, unfortunately.  Any clues would be helpful.

Thank you,

Eric

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

2 votes
Answer accepted
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
September 22, 2014

They're not contradictory instructions... it should be under one of the script roots (typically <jira_home>/scripts), and then under the directory corresponding to its package.

So an example for a post-function would be:

<jira_home>/scripts/com/onresolve/scriptrunner/canned/jira/workflow/postfunctions

 

 

 

 

Ubisoft
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
September 22, 2014

Awesome! Thanks Jamie, finally getting my errors in the logs again. Much appreciated. You rock! (BTW, love the new easy reloading of custom subclasses)

0 votes

But what if we put it on the JIRA classepath, let me say under jira_install/atlassian-jira/WEB-INF/classes/com... This should works? For me this is not working now.

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
May 11, 2015

You can put compiled classes under there, but not uncompiled groovy classes. They need to go in a scripts directory.