Forums

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

Can I install my own hooks and examples for pre-existing hooks for ScriptRunner?

Steven Whitman
Contributor
April 6, 2017

I have developed a couple different conditions and custom hooks for ScriptRunner.  Is it possible to "install" these so that other users can select them. For example for the Post Receive Email hook I have a customized template that I would like other project admins to be able to select and use, possibly tweaking it. It would be great if it should be displayed when they click expand on the examples.  For another hook, I created a custom hook which would be nice to have listed as a choice in the Scripts Pre hooks.

1 answer

Suggest an answer

Log in or Sign up to answer
1 vote
JohnsonHoward
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.
April 10, 2017

Hi Ramaiah,

It looks like you are trying to reference a non-static symbol from a static context.

You will need to create a new UserManager object. i.e:

def userManager = ComponentAccessor.getUserManager()

Then call the getUserByKey() method on this object.

Regards,

Johnson Howard

TAGS
AUG Leaders

Atlassian Community Events