The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

jira_next_next_version.png

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

fixVersion = earliestUnreleasedVersion() 

 

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Walter Buggenhout
Community Champion
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!