Add warning logs for naming deviation in form-field validation method and missing form tag in jelly

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Jelly form field naming deviation causes double validation

      When Jelly form-fields are having the validation method implemented in the corresponding Java code, if the java method parameter is not named as value, it causes the frontend to trigger validation twice. The issue happens because parameter name other than value are discovered in the checkDependsOn params list causing the validation event registered twice in the frontend javascript hudsons-behaviour.js.

       

      The issue is reproduceable, and minimal example is implemented in here

       

      This behavior is a not bug in the framework but rather the Developer should be aware of how to name things. Therefore put a warning log in console to help the developer.

       

      Missing form tag wrapper causes confusion

      When a Jelly form is having more than 1 field, and there is a validation with a dependent field. The frontend doesn't trigger validation when dependent parameter value is changed, and doesn't send the value of dependent field in the payload for current field's validation.

       

      The issue is reproduceable by removing the surrounding form tag in this minimal example.

       

      This behavior is also not a bug in the framework, but rather the Developer shouldn't be missing the <form> tag at outer level. Reason being there can be multiple forms in the same page, so each form should be correctly surrounded by the form tag.

      Therefore put a warning log in console to help the developer.

            Assignee:
            Guruprasad
            Reporter:
            Guruprasad
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: