how do i write a jql query to search bugs created in last 2 sprints
Hi @Sanket Salvi
If you sprints had a definite time interval (e.g. 2 weeks) and you know this interval, then you can write your jql using the created date variable. Something like:
project = myProject AND issuetype = bug AND (created >= sprintStartedDate and created <= sprintEndDate)
Of course the above JQL will work only if the sprints have the same time interval. If they have a different time interval, then you can simply add an OR statement with the additional time interval.
Hope that helps!
Hey @Sanket Salvi ,
I don't think it's currently possible.
You can get the results manually by getting all the bugs in the previous 2 sprint and checkng the creation time.
What do you need the results for?
I want to sort the bugs resolved in last 2 sprints to analyze the RCA (Universal)
Thanks Alex. Will try this. But I was looking for something which I dont have to change every sprint. so that then i can add a Rich filter pie chart to this jql query.
If your business need is e.g. to find all bugs from all closed sprints, then there is a solution for you.
project = DSP AND sprint in closedsprints() order by created DESC
If your need is to find all bugs from two specific sprints then you could use as well:
project = DSP AND Sprint in (2, 3) order by created DESC
Yes, and...to Alex's suggestions:
When you need something specific like this (the last 2 sprints) and you do not want to change the filters manually, you have a limited number of options:
Kind regards,Bill
It looks like you're new here. Sign in or register to get started.