Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Information about sprints

Manuel Müller June 14, 2019

Hey guys :-)

I'm trying to write an Jira (v7.1.3) plugin to get sprint information like end and start date. 

How can I do this? There is a SprintManager class, a SprintService class and a SprintIssueService class. Which one to use? 

 

I read much about using the Jira REST API? But that cannot be the best way to do this?!

 

Thank you very much in advance!

 

Greetings 

3 answers

0 votes
Manuel Müller June 14, 2019

For stuff like projects and issues, the SDK’s object ComponentAccessor has methods, getProjectManager and getIssueManager, to retrieve instances of ProjectManager and IssueManager, but we couldn’t find the equivalent in GreenHopper to instantiate objtects RapidViewManager, SprintManager, etc.

Jack Nolddor _Sweet Bananas_
Atlassian Partner
June 14, 2019

Have you tried to use on your constructor the following:

SpringManager sprintManager = ComponentAccessor.getOSGiComponentInstanceOfType(SpringManager.class);

 
It should be work.
Kind Regards

Manuel Müller June 14, 2019

Yes I did. Its there --> but its null ... :-(

 

In documentation you can see that in attliasian-plugin.xml configuration the attribute "public=true" has to be set for the component configuration. Thats not the case for SprintManager in jira-greenhopper-plugin-7.0.10.jar ...  

 

 

https://docs.atlassian.com/software/jira/docs/api/7.1.1/com/atlassian/jira/component/ComponentAccessor.html

0 votes
Manuel Müller June 14, 2019

Hi Jack! 

Thanks for your answer.

Whats the best way to use it? 

I get it not imported by just annotating it with @ComponentImport

 

It seems that Im missing something oO 

0 votes
Jack Nolddor _Sweet Bananas_
Atlassian Partner
June 14, 2019

Hi Manuel and welcome,

You can simply use SpringManager.class to get  the required information.

Kind Regards.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events