Greenhopper doesn't work at all

Nikola Sandalski
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 19, 2018

Hello i need to copy the Agile board of a project programmatically. And i think that the best way to do that is by using of greenhopper plugin and RapidViewService. When i am trying to call a method from  RapidViewService it throws a NoSuchMethodException. The plugin is successfully compiled and uploaded to the JIRA server. I tried with different versions of the plugin and different types of injecting of the Service but i am not able to use it. I have a @Scanned annotation on the top of the class, @Inject annotation on the top of the constructor and @ImportComponent annotation on the service. 

POM:

<dependency>
<groupId>com.atlassian.jira.plugins</groupId>
<artifactId>jira-greenhopper-plugin</artifactId>
<version>6.7.2</version>
<scope>provided</scope>
</dependency>
properties>
<jira.version>7.2.3</jira.version>
<amps.version>6.2.8</amps.version>
<template.renderer.version>2.0.4</template.renderer.version>
</properties>

 Calling of the service:

ServiceOutcome<RapidView> rapidViewServiceOutcome = rapidViewService.getRapidView(ApplicationUsers.toDirectoryUser(user), template.getId());

 atlassian-plugin:

<component-import key="rapidViewService" interface="com.atlassian.greenhopper.service.rapid.view.RapidViewService">
</component-import>

I think that it's some issue with the version of jira and the version of the greenhopper plugin.

1 answer

0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 20, 2018

With Jira 7, anytime you see a NoSuchMethodError you can rest assured, your plugin is not compatible with that version of Jira.

But honestly, I would never expect any Greenhopper versions OR even Jira Agile versions to be compatible with any Jira 7 version.   As of Jira 7, Atlassian rebranded Jira Agile (which was previously greenhopper) to be Jira Software.   Hence the Jira Software addon will in turn grant you all the access to the Jira Software Java APIs.  The problem with that, is that Atlassian has not publicly documented the Java APIs yet for any Jira Software 7 versions. There is a bug on this lack of posted documentation in  https://jira.atlassian.com/browse/JSWSERVER-15321

 

What I would recommend is trying to use the most recent version of Java API documented for Jira Agile 6.7.7 https://docs.atlassian.com/jira-software/6.7.7/

This is the closest existing documentation to the current Jira Software versions, so it might still be possible for you to create some code/plugin that could programmatically copy an existing agile/software board.   I'm not 100% confident that the methods will all be the same, I'm pretty sure there were a number of changes in 7.0 that might still make this not feasible until such time that the java api is publicly documented

Suggest an answer

Log in or Sign up to answer