Skip to content

Fixes ISSUE-55325: Do not allow save if mandatory text items only contain whitespaces

  • The SAVE button is disabled if any mandatory field is not filled in, see [1].
  • The allRequiredFieldsSet, when checking if a text field is empty, does not consider a string formed by whitespaces only to be empty
  • But in the backend, those string are actually considered empty [2], which results in being replaced by null [3]

To get rid of the discrepancy between the front and the backend about when is a string value considered empty, the front now considered empty those string comprised only of whitespaces.

[1] https://gitlab.com/openbravo/product/openbravo/-/blob/master/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js#L58

[2] https://gitlab.com/openbravo/product/openbravo/-/blob/master/modules/org.openbravo.service.json/src/org/openbravo/service/json/JsonToDataConverter.java#L252

[3] https://gitlab.com/openbravo/product/openbravo/-/blob/master/modules/org.openbravo.service.json/src/org/openbravo/service/json/JsonToDataConverter.java#L640

== CI ==

Try-run: https://builds.openbravo.com/job/try-checks-pgsql/2258/ (failed with formatting error that was just fixed)

Edited by Augusto Mauch

Merge request reports