Throwing myself on the mercy of the boards, because I am not having any luck getting this to work on my own:
I have several select lists with options "Please select a value", "Yes", and "No".
I want to run a simple scripted validator against these select lists that prohibits the transition if the selected value is "Please select a value".
What syntax am I looking for?
I've tried
cfValues[11083] != 'Please select a value'
! cfValues[11083]*.value.contains('Please select a value')
And variations thereof, which do not seem to work. And I have to assume this is because I am Doing It Wrong.
So, help.
Again, I want to permit the transition ONLY if the selected value is anything other than "Please select a value".
EDIT:
Additional complication is that the end customer does not want "None" as a value in the list.
Assuming it's a single select I think you want something like:
cfValues['Name of custom field'].value != 'Please select a value'
That's why I always say to use the safe navigation operator in this case:
cfValues['Name of custom field']?.value == null
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
and for checking if a select field is null ,
cfValues['Name of custom field'].value == null can't work
but use cfValues['Name of custom field'] == null
Take me 2 days to figure it out.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not really, but thanks ;-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Why don't you use the validator "Field Required" from JIRA Suite Utilities and get rid of the option "Please select a value" (move that to your field description)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Human behavior is to go with the defaults; we don't want to skew metrics, so we want to force the user to choose an actual value.
Going with "field required" defaults the field value to the first entry in the list, which is not desired.
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.