Forums

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

JQL query to pull data between Active Sprint and X number of Sprints

David Hansen
Contributor
September 6, 2023

I am wondering if there is some JQL that would allow me to pull data for the past X Sprints depending on the current Active Sprint. 

So something along the lines of 

Sprint > openSprint() - 5 AND Sprint < openSprint()

Or something along the lines of 

Sprint in ("Sprint 1")
AND Sprint in (Any other Sprint)

2 answers

1 accepted

0 votes
Answer accepted
David Hansen
Contributor
September 6, 2023

I have a created a successful query that pulls the data I want, but it is very cumbersome to maintain. Here is an example. 

 

Sprint in ("Sprint 1")
AND Sprint in ("Sprint 2", "Sprint 3", "Sprint 4", "Sprint 5", "Sprint 6)
OR Sprint in ("Sprint 2")
AND Sprint in ("Sprint 1", "Sprint 3", "Sprint 4", "Sprint 5", "Sprint 6)
OR Sprint in ("Sprint 3")
AND Sprint in ("Sprint 1", "Sprint 2", "Sprint 4", "Sprint 5", "Sprint 6)
ORDER BY assignee ASC

0 votes
Mark Higgins
Community Champion
September 6, 2023

Hi David,

Are the past sprints closed, so sprint in opensprints() and sprint in closedsprints()?

Mark

David Hansen
Contributor
September 7, 2023

It could be closed sprints to closed sprints. 
Plus, I want a specific number of sprints. 
So using closedsprints() does not limit it. 

Mark Higgins
Community Champion
September 10, 2023

Thanks fro the reply David. It does appear to be specific, and that the query that you have created, may be the only, current solution.

Agree, difficult to maintain.

Mark

Suggest an answer

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

Atlassian Community Events