Where do I find the source code for the Adaptavist Script Runner Built in Scripts?

Jeanne Howe
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 Leaders.
August 18, 2016

I am looking for the source code for the "Switch to a Different User" script. You used to be able to access the source code from the plugin UI. It seems that option is no longer available. Is there a repo somewhere I can pull the code from ?

1 answer

1 accepted

4 votes
Answer accepted
adammarkham
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 Leaders.
August 18, 2016

You can find this in the JAR file of the plugin after unzipping it. They should be *.groovy files.

The one you mention is under com/onresolve/scriptrunner/canned/jira/admin/SwitchUser.groovy

On an additional note, if you find an example you like and want to tweak it a bit and have it picked up automatically by ScriptRunner just rename the class and file name to something different and place it under one of your script roots in the corresponding directories which match the package name: <script-root>/com/onresolve/scriptrunner/canned/jira/admin/ for this example.

Same approach with listeners etc.

Suggest an answer

Log in or Sign up to answer