I'd like to write a Jira expression for use in a validator that checks if any of the following are true:
If any of these are true, the validator should allow the transition to happen. This is on the create transition in particular, so the issue should be created.
I've tried:
issue.customfield_10869.groups.includes('Account Managers') But get an error "Unrecognized property of `issue.customfield_10869.groups`: "includes""
I'm trying to create the validator using Scriptrunner.
Thanks!
I think it's because issue.customfield_10869 return a Map not a user Object.
You need to get the User object from the accountID property in the Map.
Something like
let userPickerValue = issue?.customfield_10869 != null
? new User(issue?.customfield_10869?.accountId)
: null;
Then you can do userPickerValue.groups
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.