Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0019984Openbravo ERPA. Platformpublic2012-03-08 14:122012-04-02 10:24
AugustoMauch 
AugustoMauch 
immediatecriticalalways
closedfixed 
5
 
3.0MP93.0MP9 
Google Chrome
Core
No
0019984: Values of string and textarea grid items are being truncated.
When a field is focused in edit mode in the grid, if the length of the string if longer than the displayedlength property of its field, the string will be truncated.

This is caused because the fix in issue 19805 (https://issues.openbravo.com/view.php?id=19805 [^]) changed the grid length property of strings. It used to be assigned the column length property of the field, and after that fix it uses the displaylength property.
- Open Windows, Tabs and Fields.
- Select Windows, Tabs and Fields in the header tab.
- Select Tab in the tab tab.
- Select Name in the field tab.
- Click Edit in grid button, and click on the Help/Comment column.

The value is shown truncated.
Never truncate string and textarea items.
Regression QA
related to defect 0019805 closed AugustoMauch Inconsistent column-width in grid comparing chromium to FF10 
related to defect 00200183.0MP9 closed AugustoMauch Error in the initialization of the foreign key selectors when creating a new row in grid view 
Issue History
2012-03-08 14:12AugustoMauchNew Issue
2012-03-08 14:12AugustoMauchAssigned To => AugustoMauch
2012-03-08 14:12AugustoMauchWeb browser => Google Chrome
2012-03-08 14:12AugustoMauchModules => Core
2012-03-08 16:18shuehnerIssue Monitored: shuehner
2012-03-08 16:44AugustoMauchTag Attached: Regression
2012-03-08 16:44AugustoMauchTag Detached: Regression
2012-03-08 16:44AugustoMauchTag Attached: Regression QA
2012-03-08 16:46AugustoMauchRelationship addedrelated to 0016665
2012-03-08 16:46AugustoMauchRelationship deletedrelated to 0016665
2012-03-08 16:46AugustoMauchRelationship addedrelated to 0019805
2012-03-13 12:53hgbotCheckin
2012-03-13 12:53hgbotNote Added: 0046326
2012-03-13 12:53hgbotStatusnew => resolved
2012-03-13 12:53hgbotResolutionopen => fixed
2012-03-13 12:53hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/b36fb3fb4b6d4c0a2dcf5008f3abadd54621dcff [^]
2012-03-13 12:58AugustoMauchNote Added: 0046328
2012-03-13 14:50hgbotCheckin
2012-03-13 14:50hgbotNote Added: 0046341
2012-03-13 15:31dbazNote Added: 0046347
2012-03-13 15:31dbazStatusresolved => closed
2012-03-13 15:31dbazFixed in Version => 3.0MP9
2012-03-13 23:43hgbotCheckin
2012-03-13 23:43hgbotNote Added: 0046373
2012-03-14 11:16AugustoMauchRelationship addedrelated to 0020018
2012-04-01 20:32hgbotCheckin
2012-04-01 20:32hgbotNote Added: 0047003
2012-04-01 20:32hgbotStatusclosed => resolved
2012-04-01 20:32hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/b36fb3fb4b6d4c0a2dcf5008f3abadd54621dcff [^] => http://code.openbravo.com/erp/devel/pi/rev/e68ba1be9eade4440fd86201750099fa038dc1a8 [^]
2012-04-01 20:32hgbotCheckin
2012-04-01 20:32hgbotNote Added: 0047004
2012-04-01 20:33hgbotCheckin
2012-04-01 20:33hgbotNote Added: 0047007
2012-04-02 06:09hudsonbotCheckin
2012-04-02 06:09hudsonbotNote Added: 0047115
2012-04-02 06:09hudsonbotCheckin
2012-04-02 06:09hudsonbotNote Added: 0047118
2012-04-02 06:10hudsonbotCheckin
2012-04-02 06:10hudsonbotNote Added: 0047126
2012-04-02 10:24AugustoMauchStatusresolved => closed

Notes
(0046326)
hgbot   
2012-03-13 12:53   
Repository: erp/devel/pi
Changeset: b36fb3fb4b6d4c0a2dcf5008f3abadd54621dcff
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Mar 13 12:52:29 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/b36fb3fb4b6d4c0a2dcf5008f3abadd54621dcff [^]

Fixes issue 19984: String and textarea items are no longer being truncated

The same field (grid.field) was being used for limiting the size of the input items and for calculating the width of the column. Now two different fields are defined in the UIDefinitions: 'length' to limit the size of the input items and 'displaylength' to set the length of the columns.

The code that was used to define the length of the columns is no longer using the 'length' property, now it uses the 'displaylength' property. It has been changed in two places:
- In the call of the getDefaultColumnWidth function
- In the sort function that is used to select the column to be autoexpanded

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/EnumUIDefinition.java
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/ForeignKeyUIDefinition.java
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/LinkUIDefinition.java
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/StringUIDefinition.java
---
(0046328)
AugustoMauch   
2012-03-13 12:58   
Test plan:
- Check that the example described in steps to reproduce is no longer reproducible (the text area shows the full string, it is not being truncated).
- Check that the width of the columns consistent
- Check that in order to limit the size of the string, the value being used is the length property of ad_column, not the displaylength column of ad_field (e.g. the db_prefix of the modules has an ad_column.length value of 7, and an ad_field.displaylength of 12. It should not be possible to enter more than 7 characters.)
(0046341)
hgbot   
2012-03-13 14:50   
Repository: erp/devel/pi
Changeset: 65db26640ba617779ebda1ec58eb4bb2f965e165
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Mar 13 14:48:33 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/65db26640ba617779ebda1ec58eb4bb2f965e165 [^]

Related to issue 19984: Refactored for clarity.

The initialization of fld.gridProps.width in the prepareGridFields of ob-standard-view.js has been refactored. It was being done in two places of the code depending on whether fld.gridProps.displaylength was defined. Now both initializations are done in the same if statement.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
---
(0046347)
dbaz   
2012-03-13 15:31   
Reviewed @ changeset 15787 - 65db26640ba6
(0046373)
hgbot   
2012-03-13 23:43   
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
---
(0047003)
hgbot   
2012-04-01 20:32   
Repository: erp/devel/pi
Changeset: e68ba1be9eade4440fd86201750099fa038dc1a8
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Mar 13 12:52:29 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/e68ba1be9eade4440fd86201750099fa038dc1a8 [^]

Fixes issue 19984: String and textarea items are no longer being truncated

The same field (grid.field) was being used for limiting the size of the input items and for calculating the width of the column. Now two different fields are defined in the UIDefinitions: 'length' to limit the size of the input items and 'displaylength' to set the length of the columns.

The code that was used to define the length of the columns is no longer using the 'length' property, now it uses the 'displaylength' property. It has been changed in two places:
- In the call of the getDefaultColumnWidth function
- In the sort function that is used to select the column to be autoexpanded

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/EnumUIDefinition.java
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/ForeignKeyUIDefinition.java
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/LinkUIDefinition.java
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/StringUIDefinition.java
---
(0047004)
hgbot   
2012-04-01 20:32   
Repository: erp/devel/pi
Changeset: e056a4471deebead46ffa1263d1c786b4a1964f1
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Mar 13 14:48:33 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/e056a4471deebead46ffa1263d1c786b4a1964f1 [^]

Related to issue 19984: Refactored for clarity.

The initialization of fld.gridProps.width in the prepareGridFields of ob-standard-view.js has been refactored. It was being done in two places of the code depending on whether fld.gridProps.displaylength was defined. Now both initializations are done in the same if statement.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
---
(0047007)
hgbot   
2012-04-01 20:33   
Repository: erp/devel/pi
Changeset: f1b399ebb99e05b6384cd180c2fe4e32a9d3a68f
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/f1b399ebb99e05b6384cd180c2fe4e32a9d3a68f [^]

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
---
(0047115)
hudsonbot   
2012-04-02 06:09   
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
(0047118)
hudsonbot   
2012-04-02 06:09   
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
(0047126)
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