How can I query multiple branches with earliestUnreleasedVersion()?

Gy I'm New Here Sep 29, 2017

Hi All,

In a single project we are using multiple branches like, 1.0, 1.1, 1.2 AND 2.0, 2.1, 2.2...

I'd like to write a dynamic query for the earliest unreleased version for which there is the earliestUnreleasedVersion() function. But is it possible to somehow add a condition to the result of this function? E.g. earliestUnreleasedVersion() AND versionmatch 1.* So I'd be able to differentiate the two branches. This function is currently handling all versions as one branch and give me only 1 result. Is it possible to somehow add a condition to this?

 

Thanks in advance!

1 answer

0 votes

When you say branches, I assume you are talking about JIRA versions.

Searching based on a regex is not an out of the box functionality in JIRA. You can do this with the help of a plugin like JQL Tricks. It has a versionMatches function that can be used for this purpose.

Gy I'm New Here Oct 02, 2017

Hi,

Thanks for the quick answer. Unfortunately, in my case branches means different versions of our software. Let me write an example!

I have only one project e.g.: MySoftware

In this project I have the following fixVersions: 1.0, 1.1, 1.2, 2.0, 2.1, 2.2 (two branches - 1.x and 2.x)

Let's say 1.0 and 1.1 are released 1.2 is not released on the 1.x branch while 2.0 is released,  2.1 and 2.2 is not released on the 2.x branch.

I'd like to write a dynamic query that shows the earliest unreleased version for the 2 branches separately.

If I try with:

project=MySoftware AND fixVersion = earliestUnreleasedVersion(MySoftware)

The result will be either 1.2 or 2.1 or 2.2 (depending on the dates, set for the versions)

So I've added an extra condition to separate the different branches

project=MySoftware AND fixVersion = earliestUnreleasedVersion(MySoftware) AND fixVersion in versionMatch('1.')

project=MySoftware AND fixVersion = earliestUnreleasedVersion(MySoftware) AND fixVersion in versionMatch('2.')

What I'm expecting is to get 1.2 in the first case and 2.1 in the second case, but one of this queries will have no matching result, as there can be only one earliest unreleased version within a single project which is either 1.x or 2.x. (For Jira it doesn't matter if the versions are representing 2 separate branches there can be only 1 earliest unreleased in a project.) I know I could use 2 projects for the 2 branches but unfortunately this can not be changed.

I know it's a bit complex but I tried my best to explain. I hope I was clear now.

BR,

Gy.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,110 views 13 19
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot