JQL query for 2nd earliest unreleased version?

Daniel May 25, 2023

I'm trying to build a dashboard that shows issues associated to the 2nd earliest unreleased version (2nd from bottom of unreleased version list).

I have it figured out for how to get it for the earliest unreleased version, learned about the trickiness of that JQL in this thread.

Now I need to figure out how to do the similar JQL but for a version that is not the one at the bottom of the list. I need JQL that grabs the version just above the bottom version in the list and I don't want to specify a version number in the JQL because I need it to be dynamic and populate a dashboard with the next point release regardless of version number.


This is the JQL I use to get the version at the bottom of the list:

fixVersion = earliestUnreleasedVersion() 


1 answer

0 votes
Walter Buggenhout
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 26, 2023

Hi @Daniel,

There is no function in JQL for the second unreleased version. So, unfortunately, just retrieving the issues related to that version dynamically with a single function won't work.

A couple of things you could try to do builds off the unreleasedVersions() function. It retrieves all unreleased versions. Depending on how many versions you have sitting around, you could try things like this:

fixversion in unreleasedVersions() AND fixversion != earliestUnreleasedVersion() 

 That should work for the case in your screenshot, as there's only 2 versions there. As soon as you have more unreleased versions, your query will return too many issues obviously.

If you just use the following:

fixversion in unreleasedVersions()

You can use the filter behind a two dimensional issue statistics gadget to display your issues by version and e.g. status. Or even use the built in Roadmap gadget to display information by version on your dashboard.

Hope this helps!

Suggest an answer

Log in or Sign up to answer