Forums

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

Jira API - Get Dropped Stories for a Sprint

Jason Terando June 19, 2018

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

1 vote
Answer accepted
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 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.

Jason Terando June 21, 2018

This is super helpful, thanks!

Manoj Shekhawat
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 7, 2018

Yes indeed this is super helpful. Thanks!! 

Matt Hollingsworth
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 22, 2022

Agreed, thank you! 

2 votes
Elad Ben Noam
Contributor
August 15, 2022

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