Apologies if this question is already answered.
Can someone please help me to get JQL? or anything in this regard, will highly appreciated?
Hi @t_sudhirkumar - There are a number of threads on this, but you'll be very limited in doing sprint-based JQL. This is probably the best you can do:
(sprint in openSprints() AND sprint in closedSprints()) OR (sprint in closedSprints() AND sprint in futureSprints())
Caveat - This will solve for issues that haven't been resolved yet, but will not solve for looking back historically. There simply is no way natively and I'm not sure of any marketplace apps that can solve this issue on Jira Cloud as apps like scriptrunner are dramatically reduced in capability.
Surprisingly, the only suggestion I found on this is JIRACLOUD-76579 which only has 1 vote as of this writing (I'm the first vote). I recommend you and anyone else reading this answer vote for the suggestion.
If you know what the sprints you want to look at are, then you can answer this with
sprint = sprint-1 and sprint = sprint-2
Issues retain multiple sprint values, for ones they've been in and the current one, so this will find "spill over" issues.