[ScriptRunner] Is there way to run Script Registry in new ScriptRunner v.3.0.5?

Denis Yaparov October 5, 2014

Hi All,

In old version of Script Runner for JIRA by @Jamie Echlin [Adaptavist] (2.1.17) was a very useful script Script Registry in Built-in scripts. In new combined version of plugin (3.0.5) there is no such item. In JAR-file there are classes ScriptRegistry*.class, but I can't find this action in UI. Atlassian-plugin.xml also doesn't contain this item.

Can anybody help me?

2 answers

1 accepted

1 vote
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 Leaders.
October 5, 2014

Did this used to be available? I didn't think I made it available because I never felt that it was finished.

I'll have a look at adding it back for 3.0.7. https://jamieechlin.atlassian.net/browse/GRV-531

 

Denis Yaparov October 5, 2014

Hi, Jamie! Yes, this script was available in earlier versions. It is very useful on Jira upgrades to be sure all custom scripts are tested. Also this script is useful to find all projects, where some script in file is used. Thanks!

Tom Jackson
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.
January 21, 2015

Yes, very very useful! Please add back!

Jesse Anderson January 21, 2015

Agreed, very very useful.

MattS
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.
January 21, 2015

What does it do?

Denis Yaparov March 10, 2015

Matt, this script searches around all Jira objects (workflows, listeners, conditions, vslidators, etc) and displays all scripts in list view.

Juraj Drahoš May 17, 2015

Very useful tool. I don't know about any workaround at the moment. Please fix the broken code.

0 votes
Tom Jackson
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.
January 21, 2015

I tried to roll up my sleeves and leverage the 2.1.17 version of the ScriptRegistry class. I pulled it and all of its dependencies out of the 2.1.17 plugin jar, and put 'em under my  <jira-home>\scripts folder.

I think ran the following from the script console:

import com.onresolve.jira.groovy.canned.admin.ScriptRegistry
    
ScriptRegistry registry = new ScriptRegistry()
return registry.doScript( new HashMap() );

 

Sadly I still couldn't get it to work. I get this error even if the CreateSubTask.groovy file is carefully put in its proper place ...

java.lang.ClassNotFoundException: com.onresolve.jira.groovy.canned.workflow.postfunctions.CreateSubTask at com.onresolve.jira.groovy.canned.admin.ScriptRegistry$_getWorkflowInformation_closure2_closure3_closure4_closure9.doCall(Script13.groovy:137) at com.onresolve.jira.groovy.canned.admin.ScriptRegistry$_getWorkflowInformation_closure2_closure3_closure4.doCall(Script13.groovy:132) at com.onresolve.jira.groovy.canned.admin.ScriptRegistry$_getWorkflowInformation_closure2_closure3_closure5.doCall(Script13.groovy:178) at com.onresolve.jira.groovy.canned.admin.ScriptRegistry$_getWorkflowInformation_closure2_closure3.doCall(Script13.groovy:177) at com.onresolve.jira.groovy.canned.admin.ScriptRegistry$_getWorkflowInformation_closure2.doCall(Script13.groovy:90) at com.onresolve.jira.groovy.canned.admin.ScriptRegistry.getWorkflowInformation(Script13.groovy:86) at com.onresolve.jira.groovy.canned.admin.ScriptRegistry.doScript(Script13.groovy:57) at com.onresolve.scriptrunner.canned.CannedScript$doScript.call(Unknown Source) at Script24.run(Script24.groovy:4) 

Denis Yaparov March 10, 2015

I guess, this is because of breaking changes between 2.x and 3.x, especially in Java/Groovy packages inside the plugin.

Suggest an answer

Log in or Sign up to answer