Forums

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

Help with Workflow Transition Validator

Erik Hartenian
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 11, 2023

I'm looking to create a workflow transition validator that scans a "Power Database Custom Field" (which can have multiple values), and if any of the multiple values match, it makes sure that a different User Picker field is properly set.

For instance, the Power Database Custom Field has a list of fruits that can be apple, orange, watermelon, lemon, etc. I also have another User Picker field X that may or may not be blank. If someone chooses "lemon" or "apple" for the fruit, I want to make sure that user field X isn't blank, or potentially that field X is set to a specific person. How can this be accomplished?

Thank you!

1 answer

1 accepted

0 votes
Answer accepted
Anna Hryhoruk _Appfire_
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.
July 12, 2023

Hello @Erik Hartenian ,

I think something like this should work:

SIL Validator

string errorMsg = "The USER field must have a value!";
if(contains(getInput("customfield_xxxx"), "apple") and getInput("customfield_yyyy")== "") {
return false, "customfield_yyyy", errorMsg;
}

Some documentation that may be helpful contains getInput Writing Conditions, Validators and Post Functions  

Please let me know how it goes.
Anna

Erik Hartenian
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 12, 2023

Much appreciated Anna!  This is exactly the type of thing I was looking for!

Like Anna Hryhoruk _Appfire_ likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
9.9.1
TAGS
AUG Leaders

Atlassian Community Events