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.
To retrieve sprint information in Jira using the Java API, you should use com.atlassian.greenhopper.service.sprint.SprintService
instead of SprintManager
.
The SprintManager
service is intended for internal use and may be unstable in user applications. In contrast, SprintService
, though marked as ExperimentalApi
, allows for a more reliable way to connect and retrieve sprint details.
For example, you can use the following code:
ServiceOutcome<Sprint> sprintServiceOutcome = sprintService.getSprint(user, sprintId);
This method provides a secure way to access sprint information.
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 must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 :\
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
and
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 https://developer.atlassian.com/x/mQAN
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).
help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
SprintManager if you have the sprint Id already, but SprintQueryService if you need to search.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dumb question:
how do you use SprintManager.
sample code?
tried this:
SprintManager sm = ComponentAccessor.getComponent(SprintManagerImpl.class);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello, you could use JIRA api Rest to retrieve Sprint information :
rest/greenhopper/1.0/sprintquery/[rapidviewID]"
Related discussion :
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is this true even if I am creating a plugin?
I can't use the Java API?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.