Get total story points completed in a sprint using rest api or sql in Jira DB

Can anyone help me to get the Story points completed in a specific sprint?

We usually connect directly to the rest api or database (mysql) to feed this kind of info into other management tools in the company.

I don´t mind programming something that has to traverse every issue in the sprint or whatever, but i just kind find out how JIRA knows that issue with that SP estimate was completed in that sprint.

The data can be viewed in JIRA in the velocity report, but examining SQLs logs doesn´t tell much.

Regards,

Sebastian

1 answer

Hey Sebastian,

There's an older post covering this that I believe is still relevant:

https://community.atlassian.com/t5/Answers-Developer-Questions/Is-there-a-Greenhopper-REST-API-for-accessing-story-points-for-a/qaq-p/562639

 

First you need to get the rapidview ID for the that sprint, do this here are steps:

  1. Run /rest/greenhopper/1.0/rapidview to get list of rapid views with the IDs.
  2. After you get the rapid view ID, you will need to get list of sprints in that rapid view by running/rest/greenhopper/1.0/sprints/{rapidViewId}
  3. After obtaining the Sprint ID, you can run /rest/greenhopper/1.0/rapid/charts/sprintreport?rapidViewId={rapidViewId}&sprintId={sprintID} to get list of issues for that sprint.

 

ANd once you have all the issues completed you can sum the total story points, hours logged, or any other data you are interested in.



A later post mentions /sprint being deprecated and being replaced by /sprintquery but based on the recent api docs, I believe /sprint is still applicable. I could be wrong though. Let me know if this helps (I know that post is really old but I think the answer is still accurate).

Thats a posibility but, an issue could be in more than one sprint. And only completed in the last (for example). So if you just get the status to sum the story points for the First sprint you are getting the velocity for that sprint incorrectly.

forget it using the API i managed to obtain the sprint report, it´s "historically" accurate

thanks for everything

@Bernardo Paroli

I am trying to find the same information you are using the API.  Can you please share your solution?

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published 53m ago in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

41 views 3 3
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