JQL for Last Sprint

Shawn Garner
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 23, 2017

I'm looking to see if there is a way to constantly query on the last sprint so that I could put it in a dashboard with some of the gadgets.

4 answers

1 accepted

4 votes
Answer accepted
Tayyab Bashir
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.
October 23, 2017

Hi,

There is currently no way to just get the stories/issues from recently closed or last sprint. 
Since there is no JQL function such as sprint in lastSprint(), so you'd have to manually change the JQL filter each time.

There's an open request for this feature, you can also vote on it: https://jira.atlassian.com/browse/JSWSERVER-12432

Kathy Dahmen June 4, 2018

Hello ... Does anyone know if there is an equivalent issue for CLOUD Jira?

Like Deleted user likes this
Deleted user July 5, 2018

can you help to find the issues of current month based on shift wise(6am to 3pm).???

Like Deleted user likes this
6 votes
Aline Chapman
Contributor
December 14, 2019

I would vote for this as well for Cloud, I need a filter for previous sprint and can't get to it.

Shirley
Contributor
October 15, 2021

You can add this to your JQL query, where the resolved days is the length of your sprint (in this case, 14 days for a 2-week sprint), to limit the results to the recently closed sprint:

Sprint in closedSprints() AND resolved >= -14d

Like # people like this
Daniel Rodriguez March 11, 2024

Actually they have a ticket for this https://jira.atlassian.com/browse/JRACLOUD-79678

2 votes
Dave F
Contributor
September 22, 2021

While not always providing perfect results for the recently closed sprint, the following may help. Where this can fail is if issues were closed during the sprint timeframe that were not in the sprint (e.g. in a clean-up of old issues)

https://community.atlassian.com/t5/Jira-Software-questions/Is-there-any-way-to-filter-by-the-last-3-closed-sprints/qaq-p/983771

0 votes
Paulo Meirelles September 12, 2024

Hi,I had the same issue, a lot of queries to Dashboards needing last Sprint, then once there is no way without programing, I created a program in Python that can access Jira and change the Sprint to another new Sprint on filters.

 Untitled ‑ Made with FlexClip.gif

Tre process just seek Filters that has the condition "Sprint in ({Selected Sprint])" and changes to "Sprint in ({New Sprint]).

I can share this module if you want.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events