Second cascading field "none", invalidates whole field in transition validator

Tim Franken July 16, 2013

I have a cascading select field in which a couple of options in the first field have no further options in the second, but a few do. The whole field is marked as required.

There are a couple of options for this field to be filled:

Situation 1: Field 1 = Not filled, Field 2 = Not filled
Situation 2: Field 1 = Filled, Field 2 = No options, so "None"
Situation 3: Field 1 = Filled, Field 2 = Multiple options, one is picked
Situation 4: Field 1 = Filled, Field 2 = Multiple options, but "None" is picked

When adding a validator in the form of "Cascading select field != EMPTY", situations 1 through 3 will be fine. Situation 4 is weird, since that will fail the validator even though Field 1 is filled. So if there are options in the second field, you have to pick one, even though that's not necessary when there are no options in that field.

How can I work around this in the validator?

2 answers

0 votes
Jeff Curry
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 17, 2013

None is a place holder for null hence the validation fail.

Add a N/A option for field 2 or similar and you should be able to pass the validation check

Tim Franken July 17, 2013

Well, I've added an "Other" option, but since that's not chosen by default, it's useless. Each time you have to check if there are options in field 2 and if there are, choose "Other". It would help if you could select a default for field 2 per option in field 1.

Jeff Curry
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 17, 2013

Is it an option to mark the cascading select field as required? The none option is removed if the field is required:

https://jira.atlassian.com/browse/JRA-7687

Tim Franken July 18, 2013

The field is marked as required. Only in the first field the "None" option is removed. It is present in the second field to support not having a second level for a first level option.

Jeff Curry
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 24, 2013

Drat, looks like a known bug:

https://jira.atlassian.com/browse/JRA-10302

Like Florian Luber likes this

Suggest an answer

Log in or Sign up to answer