It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to use simple scripted validator to check the Fix Version field

Matt Moody Mar 27, 2015

I have looked and tried several different way of trying to solve my problem with the Simple scripted validator but have been unsuccessful.  What I want to do is verify that the Fix Version field is not set to the value of "Future Release".  However I can't seem to make it work.  I have tried each of the following conditions in the Script Workflow transistion:

issue.fixVersions != 'Future Release'
issue.fixVersion != 'Future Release'
issue.fixVersion?.name != 'Future Release'
issue.fixVersions?.name != 'Future Release'


When I am done editing the transition I then publish the workflow and test an issue to see if it will transition on or if I get the error message.  It will always make the transition regardless of what I have in the Fix Version field.

4 answers

1 accepted

2 votes
Answer accepted
JamieA Jul 17, 2015

@Matt Moody:

! ('Future Release' in issue.fixVersions*.name)

because issue.fixVersions is a Collection.

@venkat - same solution.

Matt Moody Jul 17, 2015

That took care of it. Thanks.

0 votes
venkat Jul 16, 2015

I am also facing the same issue. We want to put a "simple scripted validator" for fix version field as part of a workflow transition.

Scenario:- fix version != Backlog

Assume fix version for a issue is Release1, when trying to fetch the value using $issue.fixVersions, it's always returning the value in [], in our case [Release1] is the value returned. (can use 'send a custom email' built in script to verify this )

 

I tried all the below combinations for 'Simple scripted validator' with no success

issue.fixVersions != 'Release1'

issue.fixVersions.name != 'Release1'

issue.fixVersions != '[Release1]'

issue.fixVersions.name != '[Release1]'

 

 

Robert G. Nadon Nov 18, 2016

your missing the *

issue.fixVersions*.name !=   'Release1'

0 votes
venkat Jul 16, 2015

@Jamie Echlin [Adaptavist] , can help us on this.

 

Thanks in Advance

0 votes
venkat Jul 17, 2015

Thanks Jamie for the prompt response. It worked.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Jira

Try Jira Cloud for Outlook: Organize your work without leaving your inbox

Hi Atlassian community, My name is Max and I work on the product integration team at Atlassian. I am pleased to announce the early access program for the Jira Cloud add-in for Outlook. This add-in...

2,565 views 6 15
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you