Good afternoon people,
I am trying to create a workflow validator for a transition screen in Jira Cloud, using Script Runner Workflow Validator.
The goal is to create a validator that checks that the value filled in customfield_10111 (Notify To) is present in the list of values included in customfield_10002(Organizations) and if that is not the case then show a warning message and not allow the action of "assign to stakeholder"
Here a screenshot of the transition screen fields to evaluate;
customfield_10002 is a organizations type, and customfield_10111 is a group picker (multiple groups) type.
Taking all this into consideration and from info in google regarding Jira expressions I managed to build this;
(issue.fields.customfield_10002.organizations || []).organizations.some(org => org.name == issue.fields.customfield_10111)
But it keeps throwing the warning message at me even though if the value in Notify To is present in Organizations field,
Could you be so kind to let me know where my mistake might be?
best regards,
Enric
Hi @Enric Márquez , thanks for your question.
Typically the vendors are the best placed to offer this kind of advice. Have you checked the documentation https://docs.adaptavist.com/sr4jc/latest/features/workflow-extensions/validators or opened a ticket with Adaptavist - https://marketplace.atlassian.com/apps/6820/scriptrunner-for-jira?hosting=cloud&tab=support ?
They should be able to help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.