How to get Sprint information using Java API ?

Is there a way to retrieve the following information for a given Sprint using Jira or greenhopper Java API:

start date
end date
Number of Issues
Number of Sub-tasks per Issue
Number of "Done" Sub-tasks per Issue and their Resolved date


Please advise. Thanks in advance.

4 answers

Hello, you could use JIRA api Rest to retrieve Sprint information :


Related discussion :

Is this true even if I am creating a plugin?

I can't use the Java API?

0 votes

Use sprintManager.getSprint() to fetch it (or if you don't have the id, look at SprintQueryService).

Then I think it's probably SprintHelper to fetch details from it.

Which way is prefered? (when developing a plugin)

This plugin is going to generate a burndown chart.


Is there some sample code that I can look at? (I am  using Jira 7.5)

Most, if not all solutions posted online are outdated :\

If you can point to anything at this point that can help, I would greatly appreciate it!

I tried searching for a Java REST client and I found this:





The moment I touch my pom.xml file (by adding the dependency), I get this

atlassian-jira.log:2017-11-09 14:28:58,810 localhost-startStop-1 ERROR [c.a.p.osgi.factory.OsgiPluginInstalledHelper] Cannot determine required plugins, cannot resolve bundle 'com.atlassian.tutorial.myPlugin'

and this

atlassian-jira.log:2017-11-09 14:29:04,510 localhost-startStop-1 ERROR [c.a.p.osgi.factory.OsgiPlugin] Detected an error (BundleException) enabling the plugin 'com.atlassian.tutorial.myPlugin' : Unresolved constraint in bundle com.atlassian.tutorial.myPlugin [172]: Unable to resolve 172.0: missing requirement [172.0] osgi.wiring.package; (osgi.wiring.package=com.sun.xml.fastinfoset.sax). This error usually occurs when your plugin imports a package from another bundle with a specific version constraint and either the bundle providing that package doesn't meet those version constraints, or there is no bundle available that provides the specified package. For more details on how to fix this, see

when i atlas-run.

Which results into my plugin getting disabled and my corrupted (i can never get it enabled again). Luckily I have a backup copy that I can refer to when this happens.

This is telling me that a piece of the puzzle is missing or incompatable (aka outdated).



SprintManager if you have the sprint Id already, but SprintQueryService if you need to search.

Dumb question:

how do you use SprintManager.

sample code?


tried this:


SprintManager sm = ComponentAccessor.getComponent(SprintManagerImpl.class);

how use SprintManager ?you method can't work;

Hi @Sevak Asadorian,

This is late, but I'm working on a similar project for JIRA v7.3 and found that you can get some info about a sprint from the (java) API using the CustomField.getValue() method. This method returns the sprint name, id, start and end dates, and a few more in a list that you can then parse.

I posted about it a little here:

Hope it helps!

you are right,i can use Sprint when i import greenhopper. SprintManager can't work yet;

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

804 views 3 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you