Hi,
I’m developing a custom plugin in which (among other things) I would like to create a Scrum Board for the project.
I have managed to include the greenhopper dependency, and have successfully used RapidViewCreationService and RapidViewService which are both injected as follows:
import com.atlassian.greenhopper.api.rapid.view.RapidViewCreationService;
import com.atlassian.greenhopper.service.rapid.view.RapidViewService;
...
@ComponentImport
private final RapidViewCreationService rapidViewCreationService;
@ComponentImport
private final RapidViewService rapidViewService;
...
public MyPluginComponent(
final RapidViewService rapidViewService,
final RapidViewCreationService rapidViewCreationService
) {
...
}
Unfortunately, I had no luck injecting the com.atlassian.greenhopper.manager.rapidview.RapidViewManager (Plugin never resolved service '&rapidViewManager') nor instantiating it in any other way (through ComponentAccessor.getComponent(RapidViewManager.class), ComponentAccessor.getOSGiComponentInstanceOfType(RapidViewManager.class) nor doing simply new RapidViewManagerImpl())
So my question is twofold:
how can I use RapidViewManager ?
is there any other way to create or copy & manipulate (setting the right filter & shares for the new project) the RapidView Board of SCRUM type?
Apparently sometimes it’s enough to post the question to find the answer
I have somehow managed to overlook the
public ServiceOutcome<RapidView> create(@Nullable ApplicationUser au, @Nonnull String string, @Nonnull Long l, @Nonnull RapidViewPreset rvp);
method of the RapidViewService, that takes: a user, a name of the board to be created, a filter ID and a RapidViewPreset (KANBAN, SCRUM) and creates a RapidView.
I will leave this answer here, as I have searched through the whole internet today and haven’t found the answer.
@matti.kiviharju, as I’m very new to this (and not a Java developer sadly), would you mind giving some more explanation on why?
I was sure that the greenhopper is a part of Jira API anyways so no need to check for it’s existence?
And so there is no misunderstanding - my code does work.