There are two custom fields(ReqApprove, DeployApprove) in radio button format, and the default value is empty. Even if there is no value, the issue can be closed. However, if there is a value, it should be checked for yes.
Is there a way to add the above conditions to one validation? If I add two individually(validation for ReqApprove, and validation form DeployApprove), Jira always check Yes of two custom fields.
Can you tell me how to add just one validation?
Hi @jun lee ,
Since you can add both, why can't you just add one? or is the question about just meeting one of the validators.
If you are looking into more of conditional validators, you may want to consider add-ons. Fro example, JSU or JMWE.
-Ben
Hi
I added validation like below.
When I added validation like this, value of two custom fields should be checked as I asked.
So I want to make one validation only if the value is checked.
If you know, tell me the script. I don't know the script.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You would do something like two pipes in-between the two statements in one line as seen below.
cfValues['ENM_ReqApprove']?.value == 'Yes' || cfValues['ENM_DeployApprove']?.value == 'Yes'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I added your script, but Jira requires value even though two custom fields are empty. I want to validation script only if custom field is not empty.
case1) field A is empty & field B is empty -> can be closed
case2) field A is not empty & field B is empty -> cannot be closed. require field A value "Yes"
case3) field A is empty & field B is not empty -> cannot be closed. require field B value "Yes"
case4) field A is not empty & field B is not empty -> cannot be closed. require field A and B values "Yes"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.