Hi Everyone,
We have a 3 drop down custom fields with same values. When user selects same values more than one custom field then it should throw the error.
Ex: Custom field A, B and C(all 3 are Drop downs)
If user selects, Apple and orange in custom field A
Orange and Mango in custom field B
Banana and Apple in custom field C
In above scenario, Apple and orange are selected more than once. Hence, we are expecting the error message like this. Apple and orange are selected more than once hence remove it to avoid duplication.
currently we are able to achieve this with below Jira expression using JMWE Build your own Validator. But only drawback is we cant able to customized the error message.
let field1 = issue.customfield_15461 ? issue.customfield_15461.map(val => val.value) : [];
let field2 = issue.customfield_15575 ? issue.customfield_15575.map(val => val.value) : [];
let field3 = issue.customfield_15576 ? issue.customfield_15576.map(val => val.value) : [];
!field1.some(val => field2.includes(val) || field3.includes(val)) && !field2.some(val => field3.includes(val))
Serial Number should not be repeated for multiple disposition types(Asset for Maintenance, Asset for BtNc and Asset for DCC).Please check and remove the duplicate Serial Number
If user selected more than 10 times from each custom field then it will be difficult for him to check which item is selected more than once.
Hence we need to clearly inform them this particular items are repeated or selected more than once.
Thanks
I'm afraid according to the official documentation from Appfire, JMWE does not support this functionality.
https://appfire.atlassian.net/wiki/spaces/JMWEC/pages/466226183/Build-your-own+scripted+Validator
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Only if you can split one validator into several (one for each situation) and add the appropriate error to each one
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.