Skip to main content
Skip table of contents

ScriptRunner setup

If you are using Groovy scripts in ScriptRunner, this section contains useful information about service reference


Reference Elements Checklist

The following code snipplet shows how to import and inject a service from Elements Checklist.

Add-on reference

GROOVY
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.

CODE
@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

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.