help me please with validation on workflow (create issues)
jmwe conditions
required fileds value must be not empty and !=0issue.get("customfield_10803")!=0 && issue.get("customfield_10804")!=0this one should works but it`s not
Hi @vsoldatova ,
are these Number custom fields? And are you using this script in a "Scripted (Groovy) Validator"?
Hi @vsoldatova
First your fields has to be number field, if it's not the case and theyr are text fields, you have to cast them into double or integer.
Also I think you should check if a value exist for your field before.
So can you try something like
( issue.get("customfield_10803") && issue.get("customfield_10803") !=0 ) &&
( issue.get("customfield_10804") && issue.get("customfield_10804") !=0 )
Because it my interpret null != 0 as true.
Regards
yes, for sure there`re number fields
yes, for sure there`re number fields.
it`s not working as well
You need to create a Scripted (Groovy) Validator, not a Field Required Validator. Conditional Validation will simply skip validation if the script returns false.
Then the script of the Scripted (Groovy) Validator should be:
issue.get("customfield_10803") && issue.get("customfield_10803") !=0 && issue.get("customfield_10804") && issue.get("customfield_10804") !=0
@David Fischer
yes, thanks! I used two validators. required and Scripted (Groovy) Validator,
its working. thanks!
It looks like you're new here. Sign in or register to get started.