Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira Service: Is it possible to create a transition validator that blocks the user from the project

Diana Osorio May 23, 2024

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?

1 answer

0 votes
Maciej Dudziak _Forgappify_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 23, 2024

Hi @Diana Osorio

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

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events