I am using a simple Simple scripted validator option to validate the Acceptance Criteria field mandatory over a workflow transition however the code is not working in some combination of operators.
Not working code
{code}
issue.projectObject.key == 'AAAA' || cfValues['Acceptance Criteria'] == null
OR
issue.projectObject.key == 'AAAA' && cfValues['Acceptance Criteria'] == null
OR
issue.projectObject.key == ['AAAA', 'BBBB'] && cfValues['Acceptance Criteria'] == null
{code}
Also not able to use validator code for multiple projects that mean the same code is added multiple time for diffrent projects to validate the same field in the same transaction.
Working code
{code}
issue.projectObject.key != 'AAAA' && cfValues['Acceptance Criteria'] != null
{code}
How come "!=" operator working perfect for here.