We are executing the following query to obtain the issues pending at the beginning (2019-02-5) of the Sprint with ID: 1185 (Sprint 12):
project = ATHP AND issuetype in (story, feature, task) AND Sprint = 1185 AND (status was not in (DONE, "BUILD COMPLETE") ON "2019-02-05" ) ORDER BY created ASC
We got 79 issues pending and 22 of them are in DONE status. So it shows the current status and not the status at a given time. Q1: Is there a way to have the status on a given day?
Now when I am trying to double check the result from the Burn-up chart I got: 78 issues (not 79). Looking into more details: we don't get the same issues. Here is the detail:
I guess I am missing something in the query in order to get exactly the same information as it is in the Burn-up chart once the sprint started.
In summary the query:
Any help to update the query so I am getting the same number of issues as in the burn-up chart.
I am trying to respond to myself: Reading again the JQL specification for operators about when to use ON clause. It seems that we need to use it only in combination with other operators to identify changes for example: WAS, WAS IN, WAS NOT, WAS NOT IN or CHANGE. To identify changes in the status for example, but not alone as I was trying to use it.
Therefore it does not capture the exact situation at the beginning of the Sprint. Instead it includes issues added later on to the Sprint or it excludes issues that were at the beginning of the Sprint but were removed later on. Probably in order to use for the purpose I wanted it will require a New Jira request (enhancement) to include it.
Here is the solution I found in order to find all issues at the beginning of the Sprint using the JIRA REST API.
The following URL allows to obtain all the information related to a board with $BOARD_ID$ and for a given Sprint with ID: $SPRINT_ID$:
"/rest/greenhopper/1.0/rapid/charts/scopechangeburndownchart?rapidViewId=$BOARD_ID$&sprintId=$SPRINT_ID$"
The Sprint ID and board Id can be found in the URL of the burndown/burnup charts in JIRA. For each board created in the project will have an ID for type of report. This number is the same for all sprint of the same board.
The above end point for greenhopper API is not formally documented by JIRA. There is a suggestion here for JSWSERVER-12877 about to document it since 2015! it has more than 28 votes, it seems they need more.. Therefore this end point can change in the future without notice.
Here is an example of the JSON string returned by JIRA REST API:
The starTime has the time the Sprint was initiated since epoch (1970/1/1) in milliseconds. Therefore we know when the Sprint started. Then the node: changes has the list of changes occurred in the Sprint, including when the issue was added to the sprint. The changes nodes has a map of different changes. For issues added the form is like this for example:
"1548166624000": [
{
"key": "XYZ-3846",
"added": true
}
],
Where: 1548166624000 represents the timestamp in milliseconds since epoch when the change occurred. When added is true the issue was added to the Sprint and if it false the issue was removed from the Sprint. This property does not have to present in all changes, only for issues added or removed.
The condition for finding all issues at the beginning of the Sprint is finding all changes where the timestamp of change is lower or equal the startTime and the property: added is true. The reason the timestamp of change can be lower than startTime of the sprint, is because it considers the time when the issue was added and it could happened before the sprint started.
Parsing the JSON string allows to find all issues at the beginning of the sprint and then we can invoke a query: "key in (XYZ-3846, XY-0010…)" with all issue keys for getting the issue information.
I parsed it in VBA for loading the information in excel file. I used the VBA-JSON parser from github. The JsonObject("changes") returns a list of changes in a dictionary object, where the key is the timestamp.
Parsing all the above element allows to identify all issues at the beginning of the sprint. The status of the issue will be the current status. I was not able to find a way to obtain the status the issue had at the time the Sprint started.
I hope it helps other member of this community with a similar problem.
Hi David, is there any chance for you to provide that VBA code? im trying to do the same but in G Sheets.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.