Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,366,849
Community Members
 
Community Events
168
Community Groups

Best way to compare select list values using the JMWE App using a validator

Hello,

I'm trying to find out the easiest way to create a validator that will compare the values of two select lists, single choice to ensure they don't have the same value.

I'd think something like this would work, but it doesnt work the way I'd expect it to.  I'm using JMWE for this.


issue.customfield_10619.value != issue.customfield_10620.value

 

1 comment

Hi @Daniel Burris ,

in what way does it not behave as expected?

I can see a problem in the script, if any of the two fields has no value, but is there a problem beyond that?

Try this:

issue.customfield_10619 == null && issue.customfield_10620 != null
|| issue.customfield_10619 != null && issue.customfield_10620 == null
|| issue.customfield_10619 != null && issue.customfield_10620 != null && issue.customfield_10619.value != issue.customfield_10620.value

This seemed to work. Thanks!

Comment

Log in or Sign up to comment