How can I get the Sprint's Start and End date in JQL?

MajoG July 12, 2013

Hello!

I would like to know how can I use the start date and end date in jql.

Thanks! Mage

9 answers

1 accepted

2 votes
Answer accepted
Jeff Curry
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 15, 2013
Tim Harsch July 10, 2015

This answer is helpful, but doesn't directly solve the problem. For instance, I am trying to write a query that would show me all newly created issues since the Sprint began, to help in backlog grooming session. openSprints() does not help.

Like # people like this
6 votes
Stu Karp November 5, 2015

I want to know how to do this as well. My reasons are that I want to know how many tickets I've completed in another project during my Sprint's start and end dates. Something like:

project="Kanban" AND status was Resolved by currentUser() and resolved >= SprintXYX.startDate and  resolved <= SprintXYX.endDate

 

Renni Verho June 12, 2018

Something like this I would like to use also. 

Unfortunately I haven't find yet.

Any ideas where to look ? 

Truong Ba Loc November 18, 2018

+1 for this, does anyone find the way to do this?

I just want to filter all issue has been resolved in currentSprint (issue is create in a Kanban board).

Stu Karp November 18, 2018

Current Sprint is easy, just use this:

resolution is not EMPTY and sprint in openSprints()

The hard part is picking a certain Sprint. Hopefully this helps. 

Angell March 8, 2019

But that query won't exclude tickets that were resolved before the sprint started.  I think what Truong (and everyone else on this thread) wants to be able to query:

resolution is not EMPTY and resolution was EMPTY before startofOpenSprints()

Obviously, the above query doesn't exist since startofOpenSprints() is not a real queryable date field. 

However, if you time it right, right before you close your sprint (if your sprint is 14 days long), run this JQL:

resolution is not EMPTY and resolution was EMPTY BEFORE -14d and Sprint in openSprints()
Like # people like this
4 votes
Jan_Denny January 6, 2020

I would also like a JQL to return this data.

0 votes
Claus Arnold December 3, 2019

As far as I know, there is unfortunately no term for this in pure JQL.

My personal goal is to monitor if any tickets have been created and moved into an active Sprint without my knowledge (alarm!). I currently work around the missing JQL term by using startofWeek(). Since all our Sprints start on (the same) Monday I use this query:

sprint in openSprints() AND createdDate > startOfWeek() ORDER BY createdDate DESC

By this I get all the tickets which have been created since start of Sprint, but only for week 1. In week two I only get the tickets for week 2 and lose all from week 1 (which is OK for me since I try to react instantly). I put the results of the query on a personal Jira dashboard and check them multiple times a day.

I hope this helps anyone who has a similar usecase.

 

Best,

Claus

sowjanya gondi May 27, 2020

could use this condition too: 

createdDate > startOfWeek(-1) 
Like # people like this
Helena Hamilton April 1, 2021

This workaround didn't help me because I don't just need tickets created and moved into the sprint, but even existing tickets moved into the sprint. Like you, I want those highlighted on a dashboard. I ended up having to use the Jira API to do it. From Python, I made an API call for all issues in that sprint of the right type, and once in Python, I could access the issue changelog to see when it was moved into the sprint. If that date was after the sprint start date, bingo!

Later I added code to put the label "ScopeAddition" on the issue after it's identified as being added after the start of the sprint. Then my dashboard just looks for that label.

Steven Remotigue April 6, 2021

I'm looking for the same thing.

 

If a sprint ends on DATE1, I would like a list of tickets in the sprint that are not a specific status in the workflow by DATE1 - X Days

0 votes
Kshitija Murudi October 10, 2018

you can search for 'sprint' in the returned response - 

CTRL+F search for sprint - you may get the field which lists down 'sprint details' - ours is a custom_field with some ID, so in jql you can then filter using that field id - or just pull out data from the returned response , accessing dictionary and key as custom field ID

 

 

JQL search can be like - jiraURL/jira/rest/api/2/search?jql=Sprint='sprint_name'&fields=customfield_100&maxResults=400

Renni Verho December 12, 2018

Did not manage to find. 

Which page you mean - where I could find sprint details custom_field ID ?  

0 votes
Akhil Som September 27, 2018

You can Try "Sprint Report" under Reports. It shows the start and end date of each sprints

Renni Verho September 27, 2018

Information is available in Jira (eg. in that page) , but I'm looking way to use it in JQL. 

Manual Copy-paste from page to JQL would not be an option in case you have many projects and sprints to handle. 

Like Ivan Filippov likes this
0 votes
Arin Heinselman September 25, 2018

As a work-around, you can get the Sprint dates in PowerBI if you have that connected. 

Navira Shetty October 10, 2018

Hi Arin,

I was looking to display  sprint start date and end date from JIRA to Power BI, can you please let me know how that can be done.

Thank you in advance.

Regards,

Navira Shetty

0 votes
Anbu Selvan October 27, 2016

is there any default add-on already available to use 

Monika February 27, 2018

and the name of the add-on would be?

Deleted user May 21, 2018
Renni Verho June 12, 2018

ScriptRunner have inSprint  etc ready made functions, but I did not manage to find way to use sprint start and end dates in JQL. 

Im trying to do similar as Completed outside of sprint function where sprint ID could be filled in like incomplete in sprint. 

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 12, 2013

Do you mean "sprinT"? I don't think you can fetch it with JQL off-the-shelf, but I think the script runner add-on would let you pull it out as a function.

Anbu Selvan October 27, 2016

is there any default add-on already available

Suggest an answer

Log in or Sign up to answer