Is there a definitive 'complete sprint' JQL query?

Ed Hirst
Contributor
March 1, 2021

Our engineering team are running into an issue with a project where, upon completion of the sprint, some issues are listed as incomplete despite no incomplete issues appearing on their board.

I believe that their board is not correctly filtering for issues which are marked 'Done' per their workflow but do not have a resolution set.

They've asked if there's a defined 'Complete Sprint' JQL query available to test against. I can't find one; it's a built-in Jira function, so functionality seems pretty much hidden under the hood.
Does anyone know if there is a definition of what runs when Complete Sprint is initiated?

2 answers

2 accepted

3 votes
Answer accepted
Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 1, 2021

Hi @Ed Hirst ,

I believe you can use this JQL, see here for documentation:

Find all issues that are assigned to a completed sprint:


sprint in closedSprints()

Would you please provide use more information?

How does the board's filter look like? Is there a sub-filter? Is this classic or next-gen project?

Thank you!

Ed Hirst
Contributor
March 1, 2021

Thanks @Hana Kučerová !

This was the original board filter.

project = ProjectName AND (cf[10130] = "Team Name" OR assignee in (Assignee1, Assignee2, Assignee3, Assignee4, Assignee5, Assignee6, Assignee7)) AND Sprint = 986 and status != done

 This is their new filter after my feedback to them:

project = ProjectName AND (cf[10130] = "Team Name" OR assignee in (Assignee1, Assignee2, Assignee3, Assignee4, Assignee5, Assignee6, Assignee7)) AND Sprint = 986 and (resolution is EMPTY or status != done)

This is a Classic Project. 

1 vote
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 1, 2021

Hello @Ed Hirst 

Be advised that JIRA does not lock down what can be added to a sprint. There is nothing programmatically that will restrict the sprint to containing issues only that are within scope of the board where the sprint exists.

So, you may be getting the message about incomplete issues because some issue has been assigned to the sprint and that issue is NOT within scope of your board filter.

You should execute this query to see what is in the sprint that is not complete:

Sprint = 986 and (resolution is EMPTY or statuscategory != done)

 

Look for issues that are not in your specified project or where the Assignee is not among your list of assignees or the field where you specify "Team Name" is empty or has some other value.

Ed Hirst
Contributor
March 1, 2021

Thanks @Trudy Claspill - I've passed that along as well.

They've just told me that they made sure to set the Resolution field on all items prior to completing their last sprint, and no longer received a message about Incomplete items, so I think we have the answer now :) They can use that query to verify in future.

Like Hana Kučerová likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events