Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0020018Openbravo ERPA. Platformpublic2012-03-14 10:482012-04-02 06:10
AugustoMauch 
AugustoMauch 
immediatemajoralways
closedfixed 
5
pi 
3.0MP93.0MP9 
Google Chrome, Mozilla Firefox
Core
No
0020018: Error in the initialization of the foreign key selectors when creating a new row in grid view
When a new record is created in grid view, the foreign key selectors are not properly initialized. There is not any option selected by default, and if the user opens the selector and selects one, that option is actually not selected.

The fix of issue 19984 changed the way the ForeignKeyUIDefinition class initializes the 'length' grid field property in the getGridFieldProperties method. Now it is initialized with the value of ad_field.displaylength, and it used to be initialized with ad_column.length. The problem is that the ad_column.length is in some cases smaller than the UUIDs of the selectors, so they are being truncated, and that causes the error in the initialization of the foreign key selector field.
- Open sales order
- Create a new record in grid view
Change the way the ForeignKeyUIDefinition class initializes the 'length' grid field property in the getGridFieldProperties class, so it uses the value of ad_column.length again.
Regression QA
related to defect 00199843.0MP9 closed AugustoMauch Values of string and textarea grid items are being truncated. 
Issue History
2012-03-14 10:48AugustoMauchNew Issue
2012-03-14 10:48AugustoMauchAssigned To => AugustoMauch
2012-03-14 10:48AugustoMauchWeb browser => Google Chrome, Mozilla Firefox
2012-03-14 10:48AugustoMauchModules => Core
2012-03-14 10:50AugustoMauchTag Attached: Regression QA
2012-03-14 11:16AugustoMauchRelationship addedrelated to 0019984
2012-03-14 11:16AugustoMauchStatusnew => scheduled
2012-03-14 11:16AugustoMauchfix_in_branch => pi
2012-03-14 11:19AugustoMauchNote Added: 0046378
2012-03-14 11:19AugustoMauchStatusscheduled => resolved
2012-03-14 11:19AugustoMauchFixed in Version => 3.0MP9
2012-03-14 11:19AugustoMauchFixed in SCM revision => 757c16d46fa08e9335db75a8cb3aa7f6bdabdc82
2012-03-14 11:19AugustoMauchResolutionopen => fixed
2012-03-14 11:36AugustoMauchNote Added: 0046379
2012-03-14 11:37AugustoMauchNote Added: 0046380
2012-03-14 11:37AugustoMauchStatusresolved => new
2012-03-14 11:37AugustoMauchResolutionfixed => open
2012-03-14 11:37AugustoMauchFixed in Version3.0MP9 =>
2012-03-14 11:37AugustoMauchStatusnew => scheduled
2012-03-14 11:37AugustoMauchStatusscheduled => resolved
2012-03-14 11:37AugustoMauchFixed in Version => 3.0MP9
2012-03-14 11:37AugustoMauchFixed in SCM revision757c16d46fa08e9335db75a8cb3aa7f6bdabdc82 => http://code.openbravo.com/erp/devel/pi/rev/757c16d46fa08e9335db75a8cb3aa7f6bdabdc82 [^]
2012-03-14 11:37AugustoMauchResolutionopen => fixed
2012-03-14 12:09hgbotCheckin
2012-03-14 12:09hgbotNote Added: 0046383
2012-03-14 12:59dbazNote Added: 0046388
2012-03-14 12:59dbazStatusresolved => closed
2012-04-01 20:33hgbotCheckin
2012-04-01 20:33hgbotNote Added: 0047008
2012-04-02 06:10hudsonbotCheckin
2012-04-02 06:10hudsonbotNote Added: 0047128

Notes
(0046378)
AugustoMauch   
2012-03-14 11:19   
The fix to this issue was linked mistakenly to the issue that caused it (https://issues.openbravo.com/view.php?id=19984 [^])
(0046379)
AugustoMauch   
2012-03-14 11:36   
Repository: erp/devel/pi
Changeset: 757c16d46fa08e9335db75a8cb3aa7f6bdabdc82
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Mar 13 23:42:12 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/757c16d46fa08e9335db75a8cb3aa7f6bdabdc82 [^]

Related to issue 19984: ForeignKeyUIDefinition uses ad_field.displaylength for length

After the fix of issue 19984 (changeset 15784), all the UIDefinition classes that defined the grid length property, took that value from ad_column.length. It works on most cases, but it does not in the ForeignKeyUIDefinition class. If it is used in the ForeignKeyUIDefinition class, when a new row is entered in the grid, the foreign key fields are not initialized properly.
Now the ForeignKeyUIDefinition class initializes the length grid field with the value of ad_field.displaylength. Changing this does not have any repercusion on determining the maximum number of characters allowed for the field. This class represents foreign keys, so its value can not be entered manually.

---
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/ForeignKeyUIDefinition.java
---
(0046380)
AugustoMauch   
2012-03-14 11:37   
Reopened to enter properly the 'Fixed in SCM revision' field
(0046383)
hgbot   
2012-03-14 12:09   
Repository: erp/devel/pi
Changeset: 74b1d0de99e26044b27bd516c22b05488ddacd37
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed Mar 14 12:07:58 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/74b1d0de99e26044b27bd516c22b05488ddacd37 [^]

Related to issue 20018: Removed length property from ForeignKeyUIDefinition

Instead of initializing the length property of getGridFieldProperties with the ad_column.length value, the length property has been removed. This will prevent errors if in the future someone enters an ad_column.length value smaller than the size of the UUIDs.

---
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/ForeignKeyUIDefinition.java
---
(0046388)
dbaz   
2012-03-14 12:59   
Reviewed @ changeset 15798 - 74b1d0de99e2
(0047008)
hgbot   
2012-04-01 20:33   
Repository: erp/devel/pi
Changeset: 543c6a45715a8d5520c8d1f7396426659c4c3874
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed Mar 14 12:07:58 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/543c6a45715a8d5520c8d1f7396426659c4c3874 [^]

Related to issue 20018: Removed length property from ForeignKeyUIDefinition

Instead of initializing the length property of getGridFieldProperties with the ad_column.length value, the length property has been removed. This will prevent errors if in the future someone enters an ad_column.length value smaller than the size of the UUIDs.

---
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/ForeignKeyUIDefinition.java
---
(0047128)
hudsonbot   
2012-04-02 06:10   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/7814864461ac [^]

Maturity status: Test