Filter based on values in a version picker

I would like to create a filter to show issues where the 'fix for' or 'affects' version picker fields contain a certain value.

So, I can say "affects=1.0", but sometimes my affects field may contain two values e.g. "1.0" and "1.0branch". So "affects=1.0" will not match that issue. I want to say "affects contains '1.0'". And as far as I know the contains operator (~) does not apply to version picker fields.

Any suggestions?

2 answers

1 accepted

Only way, AFAIK, is to say "fixVersion in (1.0, 1.0Branch)" in the JQL.

Thanks for pointing that out, for some reason I didn't even try "in", I just assumed that an issue would have to contain all the values you specify for it to match - turns out it will match if the issue contains any of the values you specify in your 'in' statement.

If you have version numbers that are quite fluid (new versions constantly being added) then a filter based on a fixed list of versions can get broken.

Thus, you can also try something like:

(fixVersion >= "1.0") AND (fixVersion < "2.0")

..but make sure that your versions are ordered correctly (don't list "1.0branch" out of sequence when doing version administration).

If you are using JIRA v5.0.x then I see that the JIRA Tricks plugin:

https://plugins.atlassian.com/plugins/com.j-tricks%3Ajql-plugin

...now offers "versionMatches(regex)". Hence:

fixversion in versionMatches("Release 1.0.*") - Returns all issues in versions with names starting at 1.0 like 1.0, 1.0.1, 1.0.2, etc.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Monday in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

555 views 6 12
Read article

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