ScriptRunner setup
Reference Elements Checklist
The following code snipplet shows how to import and inject a service from Elements Checklist.
Add-on reference
import com.valiantys.software.elements.api.content.*;
import com.valiantys.software.elements.api.model.*;
@WithPlugin("com.valiantys.software.elements")
@PluginModule
PanelContentService panelContentService
def panel = panelContentService.getPanel(IssueRef.byKey("ISSUE-1"), PanelRef.byName("My panel"))
...
Reference to Elements Checklist
The following code block tells ScriptRunner to look into Elements Checklist when searching for service references. This also helps resolving API imports.
@WithPlugin("com.valiantys.software.elements.api.model")
Reference a service
The following code block tells ScriptRunner to look for a specific plugin module. As Elements Checklist publicly exposes PanelContentService, this will be resolved and injected into the panelContentService variable.
Service reference
@PluginModule
PanelContentService panelContentService