How do I fetch Sprint Burndown data via API calls or otherwise?

Bikram Agarwal February 27, 2024

I'm currently working on a project where this is the ask - 

 

At the end of the sprint, run a script to fetch separate lists of issues (and their story points) that

  1. were committed to the sprint at the start of the sprint.
  2. were not committed to the sprint at the start of the sprint, but added later.
  3. completed during the sprint.
  4. were removed from the sprint during the sprint.
  5. are not complete at the end of sprint.

 

I see all these data are already present in the burndown chart in Jira. But I didn't find any way to export that data in an excel or csv or anything. 

 

I then tried doing it via REST API calls, but apparently there's no direct endpoint for burndown chart. I can fetch the last sprint's sprintID by parsing the output of this endpoint - 

 

https://$domain.atlassian.net/rest/agile/1.0/board/$boardId/sprint

 

and once I have correct sprintID, I can use that to fetch issues in that sprint via this - 

 

https://$domain.atlassian.net/rest/agile/1.0/sprint/{sprintId}/issue

But that would be the "current" list of issues in that sprint (e.g. when the sprint has ended). I did not find any way to get list of issues when the sprint had started. 

 


One option would be running the script at the start of the sprint, saving the output in some txt file. And then running the script again at the end of the sprint, saving the output in some txt file and comparing the two. 

Problem with this is: 

The manager (end-user of the script) will have to remember to run the script at the start of the sprint, and then remember to save the file somewhere he'll remember etc. That's not a good user experience for him. Ideally, he should be able to just run the script once and get the details for the last closed sprint.

 


So, that's where I'm stuck. Any tips on how to approach / solve this?

2 answers

2 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 27, 2024

Hi @Bikram Agarwal 

There was (and may still be) an old Greenhopper REST API function for the sprint report, and no doubt that is sunsetting.  I have not found a new one to replace that.

Some other options are:

  • There may be marketplace addons to do this same type of report for sending to those without Jira access.
  • You could use a few automation rules to track the needed changes, and then run the final report automatically when the sprint closes.  Although this would not easily track changes in the story point values, if any occurred, during the sprint.  I suspect this approach could need at least:
    • a rule triggered on sprint start to mark the issues for initial scope
    • a rule triggered on a change to the sprint field, to mark issues added to / removed from the active sprint
    • a rule triggered on sprint completed to gather and report the results
  • Build your own function / app, calling several different REST API functions to first gather issues associated to the sprint, parse the change history for each, and reconstruct the events / counts.

Kind regards,
Bill

Bikram Agarwal February 28, 2024

This is what I'm planning right now - 

1. Run the script at the end of a sprint / at the start of a new sprint. This will capture all issues in the new sprint at the start of sprint and all issues in the last sprint at the end of sprint. 

2. When this sprint ends, running the script will do the same thing again. But this time, the saved csv file has all the issues that were in the sprint at the start. So, I can do a compare then. 

0 votes
Danut M _StonikByte_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 27, 2024

Hi @Bikram Agarwal,

There is an endpoint in the GreenHopper API, but unfortunately it doesn't work on Jira Cloud. Only works with Jira Server or Jira Data Center.

 

/rest/greenhopper/1.0/rapid/charts/scopechangeburndownchart

A better and simpler solution for you that will save you a lot of work would be the Sprint Burndown Burnup Chart gadget provided by our Great Gadgets app. 

image.png

Besides the advanced burndown chart itself, this gadget displays a detailed sprint report on its Data tab, which you can export in CSV with one click:

The Data tab showing sprint details

Or, maybe the Team Velocity Chart gadget offered by the same gadget. 

Team Velocity GadgetThis one displays a detailed report with all the past sprints, which can be also exported in CSV:

The Data tab showing sprint details

Hope this helps.

Danut.

 

Bikram Agarwal February 28, 2024

Thanks for the tip, Danut. The gadget looks great. But my requirement was within my company's infrastructure and the infra team won't agree to buy / enable a new add-on. I have to find a solution within the Atlassian first party options / APIs.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events