Forums

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

How to Query (JQL) issues not in the current sprint?

Sebastian Toplician
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!
June 28, 2022

I'm trying to look for a way to write a query that will tell me what issues are not part of the current sprint, but assigned to specific individuals.

 

Query example I have below is:

project = REVOPS AND status in ("In Progress", "In Review", "Needs Refinement", On-Hold, "Pending Outside Postman", "Pending Triage", "Pending with Other Team", "Ready to Deploy", "To Do", "Under Review") AND assignee in (624a774ded4d6b00701588b6) OR "Additional Assignees[User Picker (multiple users)]" in (624a774ded4d6b00701588b6) AND Sprint not in openSprints() ORDER BY cf[10006] ASC, created DESC

 

I found a few links to help https://community.atlassian.com/t5/Jira-questions/How-to-find-all-issues-not-in-a-sprint/qaq-p/1391047, but the openSprints, closed and future aren't displaying correct results for me. For example I am seeing issues that are in our current sprint when using the "Sprint not in openSprints().

I am still getting results for issues that are in our current active sprint for the project I am querying against. Really not sure how to update it.

 

If anyone can lead me in the right direction please.

3 answers

1 accepted

2 votes
Answer accepted
Bill Sheboy
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.
June 28, 2022

Hi @Sebastian Toplician -- Welcome to the Atlassian Community!

When writing a query, the order of operations is important.  The clauses with AND occur before OR, so I suspect you are running into that.

Based on what you described, perhaps try the one below, which I reformatted for easier reading and wrapped any OR clauses with parentheses to enforce the order you noted.

project = REVOPS
AND status IN ("In Progress", "In Review", "Needs Refinement", On-Hold, "Pending Outside Postman", "Pending Triage", "Pending with Other Team", "Ready to Deploy", "To Do", "Under Review")
AND (
assignee IN (624a774ded4d6b00701588b6)
OR "Additional Assignees[User Picker (multiple users)]" IN (624a774ded4d6b00701588b6)
)
AND Sprint NOT IN openSprints()
ORDER BY cf[10006] ASC, created DESC

To learn more about JQL, please see this free online training provided by Atlassian:

https://university.atlassian.com/student/path/849533-gain-project-insights-through-jql

Kind regards,
Bill

Sebastian Toplician
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!
June 30, 2022

This was it! Thank you, and I appreciate the link too. I'll start practicing and taking up my learnings up a notch! :) 

Like Bill Sheboy likes this
0 votes
ANUJ KUMAR TIWARI
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!
January 3, 2023

I found that "Sprint not in openSprint()" do not work 

whereas "Sprint != openSprint()" worked for me

Bill Sheboy
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.
January 4, 2023
Like ANUJ KUMAR TIWARI likes this
ANUJ KUMAR TIWARI
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!
January 4, 2023

Still openSprint() worked for me, not sure whether another function exists with singular name or not 

0 votes
Mybpcreditcard
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!
June 28, 2022

Can you attach a screenshot of the Issue Navigator icon next to the backlog?


mybpcreditcard

Suggest an answer

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

Atlassian Community Events