I would like to reject the option for setting the FieldA ("Fixed in version/s") filed as long as the fieldB ("Affects Version/s") field is empty
should I work with ?
if (! cfValues['FieldA']) ...
how should I write it with script validator?
Thanks for your help !
Instead of doing this in a validator, you could set up a behaviour and hide the fixedVersions field until the user inputs something in the affectsVersions field.
Server-side script on "Affects Version/s" field:
def affectsVersions = getFieldById("versions")
def fixedInVersions = getFieldById("fixVersions")
if (!affectsVersions.value) {
fixedInVersions.setHidden(true)
} else {
fixedInVersions.setHidden(false)
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.