Project Groups for Jira logo

Project Groups for Jira Java API

The application provides ProjectGroupService for basic actions with groups, such as creating, searching, editing groups, adding projects to a group, etc.

For reference, see javadoc.

If you have problems using the API, please ask a question in our help center.

Use with ScriptRunner

The Java API is used with the ScriptRunner for Jira in accordance with its documentation. To work with the API, you need to use the @WithPlugin and @PluginModule annotations. Here is an example of a simple groovy script that you can run in the ScriptRunner console:

import com.onresolve.scriptrunner.runner.customisers.PluginModule
import com.onresolve.scriptrunner.runner.customisers.WithPlugin

ProjectGroupService projectGroupService;

projectGroupService.getGroupsList().forEach(group -> log.warn group)

Use in your plugin

Here are the recommended steps for comfortable work with the Project Groups for Jira Java API in your plugin:

1. Download your version of the Project Groups for Jira app.

2. Add it to your local Maven repo with command:

atlas-mvn install:install-file -Dfile=prjorg-X.Y.Z.jar -DgroupId=systems.npe.jira -DartifactId=prjorg -Dversion=X.Y.Z -Dpackaging=jar

Where X.Y.Z is your Project Groups for Jira version number.

3. Add dependency to the pom.xml:

<?xml version="1.0" encoding="UTF-8"?>

4. Add app packages to the Import-Package instruction of the Jira Maven Plugin:

<?xml version="1.0" encoding="UTF-8"?>

5. Now you can inject to your classes using @JiraImport annotation.