JQL for last close Sprint

Please let me know do we have any function to retrieve the values from previously closed Sprint using the script runner ?

1 answer

1 accepted

This widget could not be displayed.

The following function should be able to help you to


previousSprint(board name)

Shows issues that are members of the last completed sprint.

Thanks Tarun

When i use below query it returns the value

 issueFunction in aggregateExpression("Total Estimate for all Issues", "originalEstimate.sum()", "Remaining work", "remainingEstimate.sum()")  and sprint in (126)


But not for this one. What did i miss in my JQL

 issueFunction in aggregateExpression("Total Estimate for all Issues", "originalEstimate.sum()", "Remaining work", "remainingEstimate.sum()")  and issueFunction in (previousSprint("Olympians Board for Story (AA + BB+ CC+DD)"))


I dont want to update the query every Sprint

Tarun Sapra Community Champion Nov 07, 2017

What is returned by 

issueFunction in previousSprint(<your board name here>)

When i run this query 


issueFunction in (previousSprint("Olympians Board for Story (AA + BB+ CC+DD)")


I get no issues found. Is anything wrong in it ?

Are you entering the correct board name as you have to just enter the board name and whats "AA , BB, CC, DD" . What kind of naming is this?

Also please validate in the board that you have an closed sprint in the board as the "previousSprint" returns issues from last closed sprint.

I have updated the board name  with below 

issueFunction in (previousSprint("Olympians_Board_for_Story"))

Still it shows no issues found. I have reports and velocity chart being populated for this board

If the board name is incorrect it throws an error message. It seems to be an issue with script runner 

I found the issue in my jql. 


When i exclude "(" in front of the previous sprint it worked. Thanks Tarun


issueFunction in previousSprint("Olympians_Board_for_Story")

Good to know that it's now working. Please upvote/accept the answer if it works for you.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

134 views 2 0
Join discussion

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