I am trying to create a JQL filter that will show me all issues which have been in multiple sprints, without regard to whether it is in the current sprint. It would be nice if the sprints and dates were also available, but if I can just get the issues list that would be 90% of the problem.
There's a simple "cheat" for this - the sprint field (it's not quite a field, but close enough for most purposes) is a multiple-select field.
If an issue has been in any *active* sprint, the sprint field for the issue contains a record of that.
So, while it sounds like a search for this could be quite hard, you can answer the basic question with "sprint is not empty"
However, while the data is there, there is no direct "count number of sprints", so there's no way to do what you want to, with a clause like "number of sprints > 1".
You could look for JQL functions in apps that can count the options in a list, but I'm not sure there are any for Cloud. It might be easier to find something that can do "put sprints.size() into a numeric custom field" - automation might be able to do that, and some of the scripting apps certainly can.
Thanks for the response. Yes, I knew how to determine if an issue had been in any sprint. We were specifically looking for a way to find issues that had been held over from one sprint to another multiple times. So we really needed the "count". But additional investigation suggests that I'm not the only one to try to do this and there isn't any good way. My work around was to export the data and do the analysis in external tools.
I've seen this done with a scripted field on server, that was able to rummage through the history to see where "close sprint" had pinged a story over to another one, and count the number of times it had happened. JQL for "sprint jump count > 0" was then a simple clause.
But yes, it's a pain without coding, I don't think you can do it directly and en-masse, only by looking at each issue one at a time.
I know this is old, but perhaps this will help someone. I further realize this said "without regard to whether it is in the current sprint", but that ends up being part of the solution. This is what I've done to at least show me everything in the current sprint which has been carried over from earlier sprints:
Sprint in closedSprints() AND Sprint in openSprints()
At the very least, this shows me items in my current sprint that were carried over which I may want to dig into and make sure are moving along now.
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events