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

How to validate 2 check-box fields?

Tejas Naik May 02, 2016

Hi,

I have 2 check-box value on single checkbox custom field and want validate both of them in a transition. EX: When I tried to move transition it should throw error message “Both Approval needed” and if "Data Eng Approved” given Approval then it should show DBA Approval required vice versa. How to validate 2 check box values?  

image2016-5-3 11:11:19.png 

 

2 answers

0 votes
JamieA May 03, 2016

In a simple scripted validator the following will be true if both are checked:

cfValues["SQL-Sch..."]*.value == ["Data Eng", "DBA"]

So you just need to add the rest of your logic.

0 votes
James Bowling Jan 06, 2017

How would this be used in Atlassian Cloud?  I tried using the full scripted validator in the answer above but received errors.

Currently I have it set up as below but getting error: Field Test Checklist with actual value 'Tie shoes' does not match regular expression ["Tie shoes", "Put on coat"]

image2017-1-6 17:5:27.png

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Next-gen

Introducing subtasks for breaking down work in next-gen projects

Teams break work down in order to help simplify complex tasks. This is often done iteratively, with tasks being broken down into smaller tasks and so on until the work is accurately captured in well-...

1,095 views 13 15
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