Groovy Script condition not working in JIRA 5.1.6

We recently upgraded to JIRA v 5.1.6, and the groovy script runner simple scripted condition and validator statements we are using in one of our workflows are no longer working. Here is what we have:

To validate if a Cascading Select field contains one of 2 Combinations we are using a Script Workflow function / simple scripted condition:

Script workflow function : Simple scripted condition : Checks script:

cfValues.get("Request Type")?.getAllValues()*.value == ['Retail', 'Add prescriber'] || cfValues.get("Request Type")?.getAllValues()*.value == ['Retail', 'Add new address']

To check field lengths we are using a simple scripted validator:

Script workflow function : Simple scripted validator : Checks script:

cfValues['IMSID/DDD'].length() == 7
 
This was working correctly until we upgraded to JIRA 5.1.6 and reinstalled the Script Runner plugin.  Can someone confirm that the syntax we are using for these condition / validator statements is correct? I am trying to reinstall the Script Runner plugin now, in case that is the issue.

Thank you!

1 answer

1 accepted

We came up with a fix.

The syntax for the condition statement is now:

cfValues.get("Request Type")?.values()*.value == ['Retail', 'Add prescriber'] || cfValues.get("Request Type")?.values()*.value == ['Retail', 'Add new address']

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,958 views 12 18
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot