Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,363,680
Community Members
 
Community Events
168
Community Groups

Jira API - Get Dropped Stories for a Sprint

Hi - Using the API, I would like to set up a data extract for sprint information that includes issues removed from the sprint (like the sprint report).  From reading past posts, it seems like you could do this with the old Grasshopper APIs and accessing a rapidView.  I can't find a similar capability in either the "Jira Cloud REST API" or the "Jira Software Cloud API".  The only thing I can find that might work would be to do get all issues for a board, and then call Get Changelog for each issue and parse that to figure out changes in sprint state (look for "items" where field = "Sprint").  Am I on the right track, or am I missing something in the API that would make this easier?

2 answers

1 accepted

0 votes
Answer accepted
Andy Heinzer Atlassian Team Jun 21, 2018

Hi Jason,

You could use the changelog to try to try to figure this out, but I imagine that is a lot more data to go through to find this information.  However off hand, the Burndown Chart/report comes to mind as a good means to track issues that were added or removed to a started sprint.  When you add or remove an issue to an active sprint, the burndown report logs these as 'scope change events'.

You are correct that the old greenhopper REST API can do this.  However unfortunately, it appears that Atlassian has not yet publicly documented how you can use the REST API to pull such data from modern versions of Jira Cloud.  But there is a JAC ticket about this, please check out https://jira.atlassian.com/browse/JSWSERVER-12877

In that ticket I found that you can still use these old greenhopper endpoints in current Jira Cloud versions.   Using this information I was able to make a curl call to the endpoint

https://example.atlassian.net/rest/greenhopper/1.0/rapid/charts/scopechangeburndownchart?rapidViewId=X&sprintId=Y

where X is the board id number, and Y is the sprint id number.

And in turn the results that came back, I found this removed issue was listed in the results as

"1529594007000":[{"key":"SCRUM-33","added":false}]

Where the number is a Unix Epoch timestamp, the key is the issue key in question, and all issues removed from a sprint will have that "added":false as a means to track scope changes of removed issues.  (Where added:true indicates an issue was added to the sprint.)

I hope this helps.

This is super helpful, thanks!

Yes indeed this is super helpful. Thanks!! 

Agreed, thank you! 

Andy's answer was very informative but required a lot of calculation to get the wanted lists.

So it took me a while and based on Andy's response, I was able to find a query to get the sprint report data by using the following call:

https://example.atlassian.net/rest/greenhopper/1.0/rapid/charts/sprintreport?rapidViewId=X&sprintId=Y

You'll be able to get all the sprint report data, including "puntedIssues" (removed from sprint) as well as every other category that you can find in the sprint report, such as: "added to a sprint" and "issues completed outside of the sprint," etc.

Good luck!

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events