Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Simple scripted validator - "OR"

I'm using Adaptavist Simple Scripted Validator to check the below on create:


A). I have a field "Global" - if a user fills it in as Yes, I want them to be required to fill out field "Users"

B). If a user fills in global = no, they have to fill out one of either Users, User Types, or Dataset. 


I have the script for A (below). How do I add in the script for B? Basically I want an either/or statement


cfValues['Global']?.value != 'Yes' || cfValues['Users']

2 answers

1 accepted

0 votes
Answer accepted

I think you can achieve it using a single validator:

(cfValues['Global']?.value == 'Yes' && cfValues['Users']) || (cfValues['Global']?.value == 'No' && (cfValues['Users'] || cfValues['User Types'] || cfValues['Dataset']))

looks like a lot of brackets, but basically first part is condition A, second - B

Thank  you!

Use script-runner behaviors to achieve this. You don't need to write any groovy for this.


  • Making a field mandatory depending on other data entered on the issue screen (i.e during an issue creation or an issue transition)

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira Software

How to create Jira issus from Excel file?

When to use CSV importer When managing your processes in Jira, there are many occasions where you need to create a lot of tasks. Creating them one by one will cost you a lot of time and effort and i...

4,533 views 22 32
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you