Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Script Runner Validator Simple script not working

Nannette Mori
Contributor
October 17, 2022

Script Runner V 6.56.0

Jira Data Center 8.20.1

 

Created a simple validator on transition,

1 field type is a version Picker the other field is a radio Button type field:

cfValues['radio button Field'] ?.value == 'No' && cfValues ['Version Picker Type Custom Field'].iterator().any().toString().contains(x).  

The conditions listed above is  what we have in the Simple scripted validator to throw an exception, but the validator is not working.  Even if the Version Picker type field is updated to a version that does not contain x it will not allow the user to transition and throws the exception error.  If the radio button field is set to Yes and the Version picker is set to x the user should be allowed to transition, but the exception error is still thrown. We tried using the cfValues['My Multi Select']*.value.contains("Some value") for the Version Picker field and script runner did not like the *.  Can you tell us what we are doing wrong here?  Do we need to do something different to get the Version Picker custom type field value?  Can we not use a simple scripted validator for this? Can you tell us what we are doing wrong?

 

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.20.1
TAGS
AUG Leaders

Atlassian Community Events