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

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

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

 

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!

Yes, very very useful! Please add back!

Agreed, very very useful.

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

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

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) 

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
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,737 views 17 21
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you