Hello,
Can i extract sprint start date using JQL?
If not, is there another way this can be acomplished?
Many Thanks!
Amir
Welcome to the Atlassian Community!
No, JQL is for finding issues
You need to look to your reporting functions to find your sprint data
Hi @Amir Malka,
Unfortunately, JQL doesn't offer this functionality. There is a feature request you might want to vote on: https://jira.atlassian.com/browse/JRACLOUD-72007
There might be a much better way than the one I'm about to offer you, and it might miss your use case.
Sprints are attached to a board. You will need the board ID, which you can get by opening the board and having a look at the URL:
In my case, the ID is 20.
Then, you can use REST API to all sprints by navigating to the following URL:https://<site_name>.atlassian.net/rest/agile/1.0/board/<board_ID>/sprint
That's what I get:
If you needed this information displayed somewhere, well, you'd need to write a script to get the startDate and do something with it.
Cheers,Dawid
Hi @Amir Malka -- Welcome to the Atlassian Community!
As others have noted, that is not possible with JQL.
What problem are you trying to solve by getting the sprint start date in a query? Knowing that may help the community to offer you suggestions to help.
Kind regards,Bill
@Bill Sheboy In my case:I want to write a JQL query that will exclude issues that were marked as DONE in a previous sprint. Simple.I don't want to include in my Active sprint board's DONE column issues that were marked as DONE previously.
Your active spring board will not contain issues completed in previous sprints, you don't need to do anything to make that happen.
Your main question can be answered without looking at dates, try adding this to a copy of your board filter:
and ( Status not in (<list of status mapped into the done column>) and sprint not in openSprints() )
@Nic Brough -Adaptavist- here's how it goes in our team:Issue of story type has 5 sub-tasks. 3 sub-tasks were marked as DONE in sprint 1, the same story is moved to sprint 2 with 2 remaining undone sub-tasks. In sprint 2's active board, as soon as we start the sprint 2, will show:3 subtasks already marked as done, and 2 sub-tasks in the todo.I am trying to hide those 3 subtasks already done in sprint 1. The only way I could do that, as of now, is to add to JQL a condition to hide issues with a resolution date that is prior to the START of the Active sprint.what do you think?
Not an answer sadly as it doesn't appear to be possible but just to add my use case to the convo.
I'm trying to do the same thing as we use an automation to set the due date when it transitions to "In Progress" based on the size of the issue to help us stay on track.
My use case requiring the sprint start/end dates is simply to query for any issues with due dates that fall beyond the end of the current sprint.
I'd suggest sprint dates are absolutely within the scope of filtering for issues so should be included in JQL.
Adding my use case (in case there's another way to achieve). I want to create a swimlane for stories added in sprint (interrupts), so if created_date>sprint_start put 'em in this swim lane so we can call out and discuss interrupts.
Hi @Grant Mitchell -- Welcome to the Atlassian Community!
The solution you describe would not find all sprint, scope change issues: it would only find the ones created after the start of the sprint. If one from the backlog was added, it would not appear.
One solution for this is to use an automation rule and an indicator (e.g., a label value). For example:
The swim lane could use JQL to detect that label and raise visibility of the issues.
It looks like you're new here. Sign in or register to get started.