Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0011196Openbravo ERP01. General setuppublic2009-10-30 16:322009-11-18 00:00
networkb 
rafaroda 
highminoralways
closedfixed 
5
2.50MP6 
2.50MP102.50MP9 
Core
No
0011196: A confusing message error is shown in User window
If you fill in First name a value with more than 60 characters and a Last name with more than 60 characters, and you try to save it, this message appears:

      
ERROR: el valor es demasiado largo para el tipo character varying(60)

(in Spanish, when english is used)


Message does not say what field is too long.
Go to General Setup > Security > User.
Create a new one.
In First name enter a value about 40 characters.
In Last name enter a value about 40 characters.
Try to save it.
To fix that the callout doing this concatenation (SL_User_Name) should be improved to either shorten the concatenated name with a warning/info message.
No tags attached.
Issue History
2009-10-30 16:32networkbNew Issue
2009-10-30 16:32networkbAssigned To => rafaroda
2009-11-02 05:55rafarodaNote Added: 0021497
2009-11-02 05:55rafarodaAssigned Torafaroda => shuehner
2009-11-02 05:55rafarodaStatusnew => acknowledged
2009-11-02 15:02shuehnerNote Added: 0021507
2009-11-02 15:09rafarodaAssigned Toshuehner => rafaroda
2009-11-02 15:09rafarodaStatusacknowledged => scheduled
2009-11-02 15:09rafarodaSteps to Reproduce Updated
2009-11-02 15:10rafarodaNote Added: 0021508
2009-11-02 15:10rafarodaStatusscheduled => feedback
2009-11-02 16:05networkbNote Added: 0021511
2009-11-02 16:05networkbStatusfeedback => new
2009-11-03 08:24rafarodaPriorityimmediate => high
2009-11-03 08:24rafarodaStatusnew => scheduled
2009-11-03 08:24rafarodaSteps to Reproduce Updated
2009-11-16 19:30hgbotCheckin
2009-11-16 19:30hgbotNote Added: 0021888
2009-11-16 19:30hgbotStatusscheduled => resolved
2009-11-16 19:30hgbotResolutionopen => fixed
2009-11-16 19:30hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/1ac1162e77d90b5948509bff758ebbafb3d29c7e [^]
2009-11-16 19:34rafarodaNote Added: 0021889
2009-11-17 05:37sureshbabuNote Added: 0021891
2009-11-17 05:37sureshbabuStatusresolved => closed
2009-11-17 05:37sureshbabuFixed in Version => 2.50MP9
2009-11-18 00:00anonymoussf_bug_id0 => 2899460

Notes
(0021497)
rafaroda   
2009-11-02 05:55   
Stefan,

Can you please comment about the database language displaying the error messages?

Thanks.
(0021507)
shuehner   
2009-11-02 15:02   
The string displayed comes directly from the database system in whatever language was specified for error messages in the database server.

In general it is impossible (meaning effort/gain) to provide a translation system for every possible dbms error message type.

However, in this case we should fix the ERP to not insert the too long value in the first place.

The name & username (both 60 chars) are created based on firstname + ' ' + lastname (also both 60 chars) so an overflow can easily happen as described here.

To fix that the callout doing this concatenation (SL_User_Name) should be improved to either perhaps shorten the concatenated name with a warning/info message.
(0021508)
rafaroda   
2009-11-02 15:10   
Can you please comment if the proposed solution fits your needs?

Thanks.
(0021511)
networkb   
2009-11-02 16:05   
A warning/info message would be a proper solution
(0021888)
hgbot   
2009-11-16 19:30   
Repository: erp/devel/pi
Changeset: 1ac1162e77d90b5948509bff758ebbafb3d29c7e
Author: Rafa Roda Palacios <rafael.roda <at> openbravo.com>
Date: Thu Nov 12 04:25:24 2009 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/1ac1162e77d90b5948509bff758ebbafb3d29c7e [^]

Fixes issue 11196 Now Name and Username fields are cut to fit their fields length.

---
M src-db/database/sourcedata/AD_MESSAGE.xml
M src/org/openbravo/erpCommon/ad_callouts/SL_User_Name.java
---
(0021889)
rafaroda   
2009-11-16 19:34   
In order to test this fix:
1) Go to General Setup || Security || User
* Type First Name until the end
* Type Last Name until the end: "Name and Username have been cut to fit field length." message displays.
* Remove Last Name field data: message is cleared.
* Cut First Name to 4 characters.
* Type 4 characters for Last Name
* Type Last Name until the end: "Name and Username have been cut to fit field length." message displays.
(0021891)
sureshbabu   
2009-11-17 05:37   
Tested working as per Rafa comments