I have this statement in a ScriptRunner validator for a workflow:
issue.customfield_11687.value != null && issue.customfield_11687.value=="Yes"
The problem is that if the value is null, it returns with an error:
Evaluation failed: "issue.customfield_11687.value" - Unrecognized property of `issue.customfield_11687`: "value" ('value'). Type null does not have any properties
Is there a way that I can check for a null value, and then if not null, check the actual value?
Hi Cash,
I am assuming here that you are validating a select list field.
Instead of doing issue.customfield_11687.value != null you can just do issue.customfield_11687 != null to check if the field is empty.
The reason for this is the field will not have a value property set on it until it has a value entered into it.
I hope this helps.
Regards,
Kristian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.