Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0055325
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminoralways2024-04-25 16:372024-06-10 18:54
ReporterlorenzofidalgoView Statuspublic 
Assigned ToTriage Platform Base 
PrioritynormalResolutionfixedFixed in VersionPR24Q3
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget VersionPR24Q2
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Merge Request Statusapproved
Review Assigned To
OBNetwork customerNo
Web browser
ModulesCore
Support ticket
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0055325: [24Q2] Error "null value in column "name" violates not-null constraint" is shown to the user instead of being user friendly

DescriptionInside "Discounts and Promotions" window, if the backend user edits the "Name" field and inserts blanks and tries to save the record, the following non-friendly message is shown:
Saving failed. ERROR: null value in column "name" violates not-null constraint Detail: Failing row contains [...].
Steps To Reproduce0-Login backoffice as Openbravo.
1-Go to "Discounts and Promotions" window.
2-Create a new record in form view with the following data:
--
Discount/Promotion Type *: Buy X pay Y of same product
Name *: Test
Starting Date: 25-04-2024
X Units: 10
Y Units: 9
--
Save the record.
3-Focus the Name input field and remove its value. Press spacebar to insert a blank. Click Save button. DEFECT: A non-friendly message is shown to the backoffice user.
TagsNo tags attached.
Attached Filespng file icon NullValue.png [^] (101,415 bytes) 2024-04-25 16:42

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0164328)
hgbot (developer)
2024-05-08 13:56

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/1230 [^]
(0165750)
hgbot (developer)
2024-06-10 18:54

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 8293ace5c2e1fae2c2b54ae2f16849ec3b27c98f
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 10-06-2024 18:49:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/8293ace5c2e1fae2c2b54ae2f16849ec3b27c98f [^]

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.

Also, updates the definition of the 'required' validator, so if the value is a string, the value will be trimmed before being validated.

[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 [^]

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js
M modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
---
(0165751)
hgbot (developer)
2024-06-10 18:54

Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/1230 [^]

- Issue History
Date Modified Username Field Change
2024-04-25 16:37 lorenzofidalgo New Issue
2024-04-25 16:37 lorenzofidalgo Assigned To => Triage Platform Base
2024-04-25 16:37 lorenzofidalgo File Added: NullValue.png
2024-04-25 16:37 lorenzofidalgo OBNetwork customer => No
2024-04-25 16:37 lorenzofidalgo Modules => Core
2024-04-25 16:37 lorenzofidalgo Triggers an Emergency Pack => No
2024-04-25 16:38 lorenzofidalgo Summary Error stating "null value in column "name" violates not-null constraint" is shown to the user instead of being user friendly => [24Q2] Error "null value in column "name" violates not-null constraint" is shown to the user instead of being user friendly
2024-04-25 16:40 lorenzofidalgo Description Updated View Revisions
2024-04-25 16:42 lorenzofidalgo File Deleted: NullValue.png
2024-04-25 16:42 lorenzofidalgo File Added: NullValue.png
2024-05-06 17:10 lorenzofidalgo Target Version => PR24Q2
2024-05-08 13:56 hgbot Merge Request Status => open
2024-05-08 13:56 hgbot Note Added: 0164328
2024-05-08 16:07 AugustoMauch Status new => scheduled
2024-06-10 18:54 hgbot Merge Request Status open => approved
2024-06-10 18:54 hgbot Resolution open => fixed
2024-06-10 18:54 hgbot Status scheduled => closed
2024-06-10 18:54 hgbot Fixed in Version => PR24Q3
2024-06-10 18:54 hgbot Note Added: 0165750
2024-06-10 18:54 hgbot Note Added: 0165751


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker