JQL wildcard search of version list like fixVersion

Brent Webster
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 17, 2012

The basic question: Is there a way to do a wildcard search of a list rather than just in a text field. We are maintaining several major releases of software at a time(when a big customer says NO to the next major release and pays for support on the current release, who are we to say). i.e. example of unreleased versions:

12.0.3, 12.0.4, 12.1.1, 12.2.0

11.0.14, 11.0.15

9.1.1. 9.1.2

My PV manager wants to create a wildcard of only the 12.* versions. Currently, the only way to get around this is to individually list each of the 12 versions. i.e.

AND fixVersion in ("12.0.0", "12.0.1","12.0.2")

If I try 'AND fixVersion in ("12.*")', it results in the error: The value '12.*' does not exist for the field 'fixVersion'.

This is a pretty basic search capability so I'm hoping, it's just a misunderstanding on my part.

8 answers

1 accepted

2 votes
Answer accepted
Brent Webster
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 2, 2012

Looks like there is no answer yet but I keep getting those nagging emails that this issues is unresolved. If you are reading this then your best hope is to vote for JRA-24152.

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 17, 2012

Brent,

What do you mean by custom field lists? Looking at the original question, this should be possible by JQL Tricks.

However, it still remains paid. So can't help with that ;)

Like Caio_Stadelhofer_Dias likes this
Brent Webster
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 17, 2012

As far as I can understand the commerical JQL Tricks (grrrrrr, I hate being nickel'd and dime'd to death) cannot handle custom field lists but now I'm getting daily nag emails to close out this issue so I'll answer it.

Hubbitus December 2, 2015

So, there no working solutions without paid extensions?

Ronald Teune August 12, 2020

There is, at least today. See my comment of below. I'm quite sure (though not 100%) that this is vanilla jira.

5 votes
boardtc
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 11, 2012

The mentioned JIRA (https://jira.atlassian.com/browse/JRA-24152) references a solution using JQLTricks which works for me, e.g.

fixVersion in versionMatches('Sprint.*')

 

 

Scott Harman
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 3, 2013

There was a free plugin, which supported VersionList - but I can't find it (as it's disappeared during an upgrade yesterday)

boardtc
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 4, 2013
Arun Makhija May 27, 2018

Thanks, the above worked for me as well, however I was trying another trick but didn't work

issueFunction in issueFieldMatch("labels = <myLabel>", "fixVersion", "FY-18 *")

 It errors saying couldn't find the fieldname fixVersion, whereas it's a valid field. Has anyone tried this to do wildcard search in non-text fields

Syntax - issueFieldExactMatch

issueFieldExactMatch (subquery, fieldname, regexp)
Ronald Teune August 12, 2020

You're missing the 's' and the fact that's it a regex:

issueFunction in issueFieldMatch(" ", "fixVersions", "FY-18 .*")

should do the trick. Something similar works for me.

Like # people like this
4 votes
Leo
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 25, 2018

Starting from Jira 7.9.0 you can use the following expression to search for "12.*" versions from your example

fixVersion ~ "12.*"

 

Hubbitus June 3, 2018

Could you please point to the doc on that future?

Leo
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 3, 2018

See Advanced searching - operators reference documentation for CONTAINS (~) operator.

Daniel Waddington June 29, 2018

On JIRA Cloud:

The operator '~' is not supported by the 'fixVersion' field.
Like # people like this
Xavier Ramírez Majó July 4, 2018

When will this be added in Jira cloud?

Morten Damm Jensen August 27, 2018

I would also really like the fuzzy search to be added to fixVersion in Jira Cloud.

@Leo, can you tell if it is a feature that will be added to  Jira Cloud as well?

Leo
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 27, 2018

@Morten Damm Jensen 

I believe the corresponding feature for Jira Cloud is tracked in JRACLOUD-24152 ticket. So I suggest you to vote for it or ask a question.

Morten Damm Jensen August 27, 2018

Thank you for the link to the correct ticket, Leonid.

Arun Makhija August 27, 2018

Hi @Leo , we have JIRA v7.7.0 and I am able to use wild card search, although a little differently

Please see below and it works

fixVersion in versionMatch("REL FY18*")
Like # people like this
Leo
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 28, 2018

@Arun Makhija I suppose your Jira instance has a third-party plugin installed providing this functionality.

Starting from Jira 7.9.0 the version wildcard search functionality is built in into Jira and can be used out of the box without any additional plugin installations.

Arun Makhija August 28, 2018

Thank you @Leo

Arun Makhija August 29, 2018

Update, recently our JIRA version moved upto Jira v7.11.2

The below query works like a charm

fixVersion ~ "REL FY18*"
Like # people like this
1 vote
Jack Nolddor _Sweet Bananas_ December 17, 2017

Unfortunately you cannot use wildcards using native Jira methods.

You can use a FREE app called JQL Booster Pack and use the versionMatches() JQL function to get the requested functionality

------

Examples:

• Find issues affected by versions that ther name starts with 'v1' i.e. 'v1.1.0', 'v1.2', 'v1.1.6', etc:

affectedVersion IN versionMatches("v1.*")

• Find issues fixed in versions that ther name contains 'alpha':

fixVersion IN versionMatches(".*alpha.*")

• Find issues affected by versions that ther name starts with 'SNAPSHOT' i.e. 'v1.1-SNAPSHOT', 'v1.5-NIGHTLY_SNAPSHOT', etc:

affectedVersion IN versionMatches(".*SNAPSHOT")
Steve April 17, 2019

This is server-only.  Not for cloud.

1 vote
Brent Webster
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 6, 2013

I ended up using the Script Runner plugin which has several JQL functions including matchVersion. Works great.

1 vote
Andrew Frayling
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 17, 2012

Hi Brent,

From JIRA 4.3 onwards you can use ff:12* (for Fix For Version) and v:12* (Affects Version) in the Quick Search box (http://confluence.atlassian.com/display/JIRA043/Using+Quick+Search), but it looks like this is not impemented in JQL yet and is an open feature request (https://jira.atlassian.com/browse/JRA-24152)

Wildcard searches are available in JQL (http://confluence.atlassian.com/display/JIRA043/Advanced+Searching#AdvancedSearching-CONTAINS), but only for free text fields.

Hope that's of some help,

Andrew.

Brent Webster
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 17, 2012

Thanks for the quick reply but it misses the mark.

The Quick Search method is more of a macro that substitutes the current list of 12.* versions into the search of affectedVersion or fixVersion lists. I can't save it as a dynamic filter but rather a hardcoded list of versions at the time I involved the Quick Search.

As for CONTAINS, as you stated, it only works for text based fields.

I'll left this query open for a while, in hopes that someone can propose a workaround.

BTW, I voted for JRA-24152, thanks

0 votes
Zaur Suleymanov March 10, 2021

It is 2021 now, and it is really astounding that such a basic function to search versions by approximate name is still not possible in Jira...

Ronald Teune March 10, 2021

It's perfectly possible, although a little hidden in the accepted answer. Please see my comment of Aug 12, 2020  .

Zaur Suleymanov March 11, 2021

Nope, that does not work now, with Cloud jira. I tried: fixVersion (and fixVersions) = "ABC .*" and many other combinations and it did not work.

Ronald Teune March 15, 2021

And what kind of expression do you use? Your example here doesn't look like the one I suggested above (standing on the shoulders of giants, BTW):

issueFunction in issueFieldMatch(" ", "fixVersions", "FY-18 .*")
Zaur Suleymanov March 15, 2021

Issue navigator - Jira and 2 more pages - Personal.png

0 votes
grisevg September 25, 2015

You can do ">=" and "<" to limit certain version range.

For example "fixVersion >= 0.24.0 AND < fixVersion 0.25.0"

Hubbitus December 2, 2015

Unfortunately it will provide different results see https://jira.atlassian.com/browse/JRA-22995

Like Bill Gallinger likes this

Suggest an answer

Log in or Sign up to answer