Configuration Management add-on's Javadoc API is not perfect, but it should help you a lot if you want to develop your own ScriptRunner integrations. You can access the API here. Note that this API is for latest version of the app, please contact us if you need previous version of the API.


API of add-on slightly changed with 1.12.0 version. The biggest change is that we have moved bundle related methods from CMPVersionMappingService to BundleService. Nearly all method signatures are the same. When creating your scripts please check which version of the "Configuration Management Toolkit" app you are using, and code accordingly. 



import com.deniz.jira.versioning.subcomponents.SubcomponentsService;
import com.onresolve.scriptrunner.runner.customisers.PluginModule;
import com.onresolve.scriptrunner.runner.customisers.WithPlugin;

@WithPlugin("com.deniz.jira.versioning")
@PluginModule
SubcomponentsService subcomponentsService;
return subcomponentsService.getParentComponentHierarchy(10800L); //this is the component or virtual component id


import com.deniz.jira.versioning.subcomponents.SubcomponentsService;
import com.deniz.jira.versioning.subcomponents.ComponentHierarchy;
import com.onresolve.scriptrunner.runner.customisers.PluginModule;
import com.onresolve.scriptrunner.runner.customisers.WithPlugin;

@WithPlugin("com.deniz.jira.versioning")
@PluginModule
SubcomponentsService subcomponentsService;
com.google.common.base.Optional<ComponentHierarchy> componentHierarchy = subcomponentsService.getComponentHierarchy("ERP", true); //since we pass true for second argument all components are returned if hierarchy is not defined


import com.deniz.jira.versioning.CmpVersionMappingService;
import com.onresolve.scriptrunner.runner.customisers.PluginModule;
import com.onresolve.scriptrunner.runner.customisers.WithPlugin;

@WithPlugin("com.deniz.jira.versioning")
@PluginModule
CmpVersionMappingService cvService;
@WithPlugin("com.deniz.jira.versioning")
@PluginModule
BundleService bundleService;

//return cvService.getAllBundles(10000L); //Id of the project. FOR VERSIONS BEFORE 1.12.0
return bundleService.getAllBundles(1000L); //FOR VERSIONS 1.12.0+


import com.deniz.jira.versioning.subprojects.SubprojectsService;
import com.onresolve.scriptrunner.runner.customisers.PluginModule;
import com.onresolve.scriptrunner.runner.customisers.WithPlugin;

@WithPlugin("com.deniz.jira.versioning")
@PluginModule
SubprojectsService subprojects;
return subprojects.getSubprojectHierarchyOf(-1); //Returns whole project hierarhcy. pass a project id to return a subtree.


More detailed Samples