Forums

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

JMWE Validation Logic to show an error based on user picker / radio button selections

Daniel Burris November 7, 2021

Hello. I'm using Jira misc workflow extensions for JIRA cloud. I want to show an error under the following condition using the build your own validator:

 

IF a radio button == "No"  && Userpicker is NOT empty, display error

 

I've tried the following, but it doesn't seem to work properly, it shows the error even if the radio is set to yes:

12449 = radio button custom field

12465 = user picker custom field 

 

(!issue.customfield_12449 && issue.customfield_12449.value == "No") && (! issue.customfield_12465 || ! issue.customfield_12465.accountId)

 

 

 

 

1 answer

1 vote
David Fischer
Community Champion
November 7, 2021

Hi @Daniel Burris ,

I believe what you need is:

!issue.customfield_12449 || issue.customfield_12449.value != "No" || ! issue.customfield_12465
Daniel B
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!
December 10, 2021

Thanks, I had to change the fields around on my end, but the above worked perfectly. Thanks!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events