Forums

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

How does the burndown chart know a removed issue was once in a sprint?

Scott Jackson August 25, 2020

I've been manually looking at reports from Jira Software like the Burndown Chart to generate some metrics on team performance. One of the things I've been looking at is how many issues are added or removed from a sprint after it's started (to gauge how much the team's focus may have shifted after planning).

If I look at the Burndown Chart, I get a list of stories at the start of the sprint and then a list of "significant events" like when issues are completed, estimates changed, or an issues is added to or removed from the sprint. I've started working on a way to automate this analysis with the REST API but have run into an issue.

Consider a story with the issue key FOO-42. Sprint 5 was started with FOO-42 as part of the plan but it was later moved out of the sprint. This is clearly visible on the Burndown Chart report. However when I run a JQL query looking for all issues in Sprint 5, FOO-42 doesn't show up. If I go look at the history for this story, I can see where the "Sprint" value changed from "Sprint 5" to null, and I've seen other issues that have multiple sprints (e.g., "Sprint 5, Sprint 6, Sprint 7") in the "Sprint" field if they were carried over from one sprint to the next. Those show up fine in my queries but instances where an instance was simply moved out of a sprint are not.

How does Jira internally know that an issue like FOO-42 was once part of a sprint for reporting purposes? Is there a way I can efficiently access the same information through the REST API?

1 answer

0 votes
Kirkie
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.
August 25, 2020

It would make most since that it is simply accessing the issue history. Queries of "sprint in" would check what the current Sprint field is set to, while the burndown chart would look at the sprint field history to see which sprints it was previously in.

To access this yourself you can use the ChangeHistoryManager on any issue:

https://docs.atlassian.com/software/jira/docs/api/7.0.5/com/atlassian/jira/issue/changehistory/ChangeHistoryManager.html

Scott Jackson August 25, 2020

That looks like it would be useful in this situation, but it appears to be part of a Java API. Is there a way to use the REST API or a JQL query to do something similar?

Kirkie
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.
August 25, 2020

You would use the Java REST API with the above methods. Another alternative is to script something up in Groovy or similar server side.

Scott Jackson August 26, 2020

Thanks for all the responses! I think that my confusion is the result of a misunderstanding, probably due in no small part to me being a newbie at REST in general. I had hoped for something in the REST API or Agile REST API that I could use to grab JSON by accessing a URL like http://my.jira.com/rest/api/latest/changehistorymanager using a web browser or Python script on my local machine. I didn't see the ChangeHistoryManager in either of the links I posted above, thus my confusion. I didn't know that "Java REST API" was a thing so I'll have to do some more research on that.

Based on your response, it sounds like this is something I can't do with REST without relying on Java and the Atlassian SDK, which I'll need to learn more about.

Suggest an answer

Log in or Sign up to answer