I want to validate a JSM request using scriptrunner in the create step. But I'm struggling to get it to work.
I have the following to check the id of an Asset field is the value e want and to also check a second dependent field is populated.
(issue?.customfield_12411.filter(it => it.objectId == "608").length > 0)
&&
issue?.customfield_10344 != null
This works as expected in the Test option o the validator set up screen.
But in situ, creating a request ticket in the portal it returns the error message in all conditions.
Has anyone accessed Cloud Assets in a jira expression?