Condition on fix version

Pierre Cattin
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 19, 2014

Hi,

I am trying to use the post-function "Fast-track transition an issue" with a condition on the fix version: I only want that post function to apply to issues that don't have a specific fix version.

The problem is that I can't find how to write a condition that is false when an issue has a specific fix version. Could somebody help me to write that condition?

2 answers

1 accepted

1 vote
Answer accepted
JamieA
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 28, 2014

This should be

"10.02" in issue.fixVersions*.name

Because... fixVersions returns a collection of Version, and the name is got by the getName() method.

Pierre Cattin
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 29, 2014

Thanks alot!

Kate McAnespie November 7, 2016

How do you do "not in fixVersions"?

Usually this was just:

! ["version x", "version y", "version z"] in issue.fixVersions*.name

But for reason, the fast track transition fails, when the version = version a

Kate McAnespie November 7, 2016

nevermind...figured it out.

! issue.fixVersions*.name.intersect(["version x", "version y", "version z"]) && issue.fixVersions

Deepali Bagul June 15, 2018

Thanks @JamieA

"10.02" in issue.fixVersions*.name

Worked !  

0 votes
Mx Admin January 19, 2014

Hi Pierre,

Have you tried issue.fixVersion != "version1"

Regards

Anand

Pierre Cattin
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 19, 2014

Thanks, but I tried that (with an "s") with the condition tester and the result is always "true", even when it should be "false". Does it work for you?

Here is what I get when I assert "issue.fixVersion=="10.02"":

JamieA
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 28, 2014

the square brackets indicate that it's a collection of some form, not a plain String.

Suggest an answer

Log in or Sign up to answer