Is there a way to search for an exact value on a version field?

Patrick Telford March 12, 2015

If I have a version field (e.g affectedVersion), which can store multiple values, and I want to find all issues where there is a specific combination of values (not just issues that contain any of them), can I do it?

e.g.

Issue 1, affectedVersion = 1.0

Issue 2, affectedVersion = 1.0, 2.0

Issue3, affectedVersion = 2.0

 

Is there a search that I can do to identify issues where the affectedVersion only contains "2.0" (i.e. I want to return Issue 3, but not Issue 2)?

Thanks

5 answers

1 accepted

0 votes
Answer accepted
Udo Brand
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.
March 13, 2015

You would need to filter on version 2.0 and exclude in the same query all other versions (possible if you have only few)

fixversion = "2.0" and not fixversion in ("1.0","1.1","1.2",....)

But since the second expression can contain many versions I don't think it is feasable.

Patrick Telford March 13, 2015

Thanks - yes, unfortunately I have a lot of versions, so while this might be feasible as a one off, it will be difficult to use longer term.

Udo Brand
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.
March 13, 2015

Yes, that's why it is not feasibel. With each new version you would need to change the filter. So since scriptrunner isn't available on JIRA Cloud, I guess you are stuck.

1 vote
Marton Varga January 25, 2019

Hey

Don't know if it's still relevand but for the future generations:

-I wanted to search for a specific fixVersion(So Issue2)

-I've tried the method above but i still got result that have more than 1 fixVersion.

-about 4 hours later i started thinking and found out this:

fixVersion not in versionMatch("^(?!Version 1.2.3$)")

and it works properly ;)

0 votes
Dmytro G May 30, 2019

This should satisfy your need:

AND (fixVersion < 2.0 OR fixVersion > 2.0)

 

0 votes
RPandyaram
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.
April 8, 2015

You have to use script runner plugin for that,

It gives an option to look for exact match

Ex:

project = ABCD AND issuetype = Epic AND fixVersion in versionMatch("Version 1.1")

0 votes
Patrick Telford March 13, 2015

Thanks.

Is that available for the cloud version? I can't see it in the marketplace.

RPandyaram
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.
April 8, 2015

Unfortunately no . This plugin is not available for cloud.

Suggest an answer

Log in or Sign up to answer