I have tried to retrieve it with ComponentAccessor/ComponentManager. But no luck, it returns null and
GroovyClassLoader gcl = scriptManager.getGcl()
def renameUser = gcl.loadClass("com.onresolve.jira.groovy.canned.admin.RenameUser", true, false).newInstance();
fails with error "Cannot invoke method getGcl() on null object"
I tried both
def scriptManagerClass = ComponentAccessor.getPluginAccessor().getClassLoader().loadClass("com.onresolve.jira.groovy.ScriptManager") def scriptManager = ComponentAccessor.getOSGiComponentInstanceOfType(scriptManagerClass)
def scriptManager = (ScriptManager) ComponentAccessor.getComponent(ScriptManager.class);
but it returns a null.
I am trying to write a script to merge multiple users. Any suggestions?
I am trying to reuse the RenameUser from inbuilt "Rename User ID" script to "merge" multiple users. If that works, instead of making changes to the inbuilt scripts or rewriting the whole script , features can be used. There are some examples here https://bitbucket.org/fhess/scriptrunner-public/src/522c5c99ab52/src/test/resources/examples/RenameDuplicateUsers.groovybut it's not working anymore.
Atlas Camp is our developer event which will take place in Barcelona, Spain from the 6th -7th of September . This is a great opportunity to meet other developers and get n...
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!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG