JQL - Explanation of what closedSprints() does

Roberto L
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, 2017

Hello Community,

Can anyone provide me with a detailed explanation of what exacctly "closedSprints()" should return when used in JQL as sprints in closedSprints()?

Thank you!

-Roberto

2 answers

1 accepted

1 vote
Answer accepted
somethingblue
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 25, 2017

Hi Roberto,

Have you seen Advanced Searching Functions:

Search for issues that are assigned to a completed Sprint. (Note that it is possible for an issue to belong to both a completed Sprint(s) and an incomplete Sprint(s).)

Syntax

closedSprints()
Supported Fields
Examples
  • Find all issues that are assigned to a completed Sprint.

    sprint in closedSprints()

This is in contrast to openSprints() which finds issues in sprints that have not yet been completed.

Are you trying to construct a query and getting results that you're not expecting?  If so please provide the query.

Cheers,

Branden

1 vote
SILVIA TEJERA May 2, 2019

Hi,

I have the following query that is not returning the expected results because in the list there are jiras that were closed in previous sprints...

project = [project.name] AND Sprint != [sprint.code] and status = Closed and issue not in closedSprints()

Thanks

Silvia

James Hendrix February 25, 2022

If the sprint referenced by [sprint.code] is closed and this query produces a result, inspect the history of the issues.  They were likely closed outside of the sprint time box.  It is WHEN an issue is closed that also matters, not just the intersection of sprint assignment and sprint status.  It is for this reason that I always try to ensure my sprints cover 24/7 timespans - that is, the start of my next sprint always starts the minute that my current sprint ends.  Gaps between sprint time boxes cause some stories to fall into these gaps.

I cannot remember if it also matters WHEN the sprint was closed.  I don't THINK it does, but I wouldn't be surprised if it did.  In other words, might also need to make sure that the issue was closed prior to closing the assigned sprint, regardless of the end time specified in the sprint time box.  Again, I DON'T THINK it does, but it's worth checking out if the first scenario I described doesn't reveal the reason your query produces results.

Suggest an answer

Log in or Sign up to answer