I need to create a validator, which if the project role is an external type user, can only allow the transition if the "a" field is blank, if this field is filled it cannot be transitioned. If the project role user is another, you can only transition if the "a" field has been filled in. Is it possible?
I think that described case can be addressed using a Jira expression-based validator. There are several options available on the Atlassian marketplace.
I am from Forgappify, and we developed Jira Expression Validator, which is part of the Workflow Building Blocks for Jira app.
The expression you need could look as follows:
user.getProjectRoles(issue.project).reduce(
(isAllowed, role) => isAllowed || ["External"].includes(role.name),
false
) ? issue.customfield_12334 == null : issue.customfield_12345 != null
Put the name of your project role in place of "External". You also need to change customfield_12334 to your field ID. In the expression editor, when you start typing the name of your field, you will get a suggestion for the ID.
Condition may slightly differ depending on type of your field.
I hope it will help.
Cheers
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.