jenkinsci/jenkins — pull request #695 by jmcnally (2013-02-06 22:51:46+00:00)
Title: [JENKINS-16676] RelativePath dependent field validations do not work

* test/src/test/java/hudson/util/FormFieldValidatorTest.java
(testNegative): minor change to better identify the Descriptor class, given that two
more are being added.

(testOptionalCompoundFieldDependentValidation): new test for the bug. Uses helper classes:
CompoundField and CompoundFieldValidatorBuilder which are similar to code found in the
collabnet plugin.

* test/src/test/resources/hudson/util/FormFieldValidatorTest/CompoundField/config.jelly
* test/src/test/resources/hudson/util/FormFieldValidatorTest/CompoundFieldValidatorBuilder/config.jelly
Simple form elements for the new test

* war/src/main/webapp/scripts/hudson-behavior.js
(locate): optional fields will have the checkbox as parent and it will have a '._' prefixed name.

optional-block and row-set related classes need to be intiialized prior to field validation
registration in order for parent elements to be properly defined.