Forums

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

JQL Query for "Issues completed outside of this sprint"

Paul S September 9, 2018

Guys,

I need some urgent help here -  Is there a way to run a Jira JQL query or Rest API call (Python 3) to figure out the issues that are "Issues completed outside of this sprint"... 

I am looking for something similar to the following script Runner command:

completeInSprint(board name, [sprint name])

 I got the following output ok from a Python call:  completeInSprint, incompleteInSprint, addedAfterSprintStart, removedAfterSprintStart ... But not the "Issues completed outside of this sprint"

2 answers

1 accepted

1 vote
Answer accepted
Prakhar Srivastav {Appfire}
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.
September 10, 2018

@Paul S

 

You can use 

issueFunction not in completeInSprint(board name, [sprint name])

 

Regards

Prakhar

Paul S September 10, 2018

Thanks Prakhar, but that does not work either.  In fact, I had tried that before with no luck.  The problem with the suggestion above is that it returns ALL issues which were not completed in the sprint - which is not what I need.  

I also thought of pairing the above suggestion with the sprint, to say something like the following...  still no luck

sprint = [sprint number] and issueFunction not in completeInSprint(board name, [sprint name])
Like dominic muscatella likes this
Paul S September 10, 2018

Actually, it works if I add the list of "closed" status to the query, to give the following.  Thanks for the help Prakhar.

 

sprint = [sprint number] and status in (confirmed, closed) and issueFunction not in completeInSprint(board name, [sprint name])
Like dominic muscatella likes this
Paul S September 10, 2018

Prakhar, I have also accepted the solution.  thx

Renni Verho
Contributor
November 14, 2018

query above includes also issues which are moved to another sprint, so : 

issueFunction not in incompleteInSprint(board name, [sprint name])  would be needed compared jira sprint report results. 

we do not list sub-tasks etc., so I added to my query  issuetype in standardIssueTypes(). 

End result : 

project = [project] AND status changed to ("Closed","Done") before ([sprint end date+1day]) AND issueFunction not in completeInSprint(board name, [sprint name]) AND issuetype in standardIssueTypes() AND issueFunction not in incompleteInSprint(board name, [sprint name]) AND Sprint = [sprint number]

Like Deleted user likes this
Menaka
Contributor
July 8, 2022

.

2 votes
Deleted user March 27, 2020

If you install scriptrunner in your jira environment you can use following: (if you need more information about JQL issue functions please refer here in scriptrunner documentation https://scriptrunner.adaptavist.com/4.3.6/jira/jql-functions.html#_agile


Completed Issue: issueFunction in completeInSprint("CT Avengers board", "Team Avengers PI1 Sprint 1")

Issue Not Completed: issueFunction in incompleteInSprint("CT Avengers board", "Team Avengers PI1 Sprint 1")

Issue Completed Outside of Sprint: Sprint = "Team Avengers PI1 Sprint 1" AND issueFunction in addedAfterSprintStart("CT Avengers board", "Team Avengers PI1 Sprint 1") AND NOT issueFunction in completeInSprint("CT Avengers board", "Team Avengers PI1 Sprint 1") AND NOT issueFunction in incompleteInSprint("CT Avengers board", "Team Avengers PI1 Sprint 1")

Issues removed from sprint: issueFunction in removedAfterSprintStart("CT Avengers board", "Team Avengers PI1 Sprint 1")

Following is the explanation of each category:

Completed Issue : Issues that were in any state associated with the board before the sprint started and that was transitioned into one of the statuses associated with the column that is the farthest on the right of the board, during the time that the sprint was active.

Issue Not Completed : Any issue associated with the sprint that is not associated with one of the statuses associated with the column that is the farthest on the right of the board, during the time that the sprint was active.

Issue Completed Outside of Sprint : Issues that were completed (i.e. transitioned into one of the statuses associated with the column that is the farthest on the right of the board) but did not have the Sprint field associated with that specific sprint and were later assigned to that sprint (this counts even if they were associated with the sprint before the sprint was started).

Issues removed from sprint : Issues that were associated with the sprint when it was started, but are no longer associated with it when it was completed.


Deleted user March 27, 2020

Also I have been informed by atlassian developer team as : 

We have also investigated the information used to generate these reports and these burndown changes are available via our REST API, this particular API is not documented and can be changed at the discretion of our development team, as it is an internal API. For example, using the requesting the endpoint below, will give you a list of these changes:

rest/greenhopper/1.0/rapid/charts/scopechangeburndownchart.json?rapidViewId=<rapidViewId>&sprintId=<sprintId>&_=<currentTimeInMs>

Similarly, requesting the endpoint below, will give you the data used to build the table below the sprint report:

/rest/greenhopper/1.0/rapid/charts/sprintreport?rapidViewId=*&sprintId=* gives you the data which is used to build the table below the sprint report

Suggest an answer

Log in or Sign up to answer