Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0024403Openbravo ERPA. Platformpublic2013-07-23 15:592013-10-29 16:58
AugustoMauch 
AugustoMauch 
normalmajorhave not tried
closedfixed 
5
 
3.0MP293.0MP29 
alostale
Core
No
0024403: When the grid calls the datasource, it should not retrieve the properties that are not shown in the grid.
When datasource is called from the grid all the properties are returned from each row, regardless of whether they are shown in the grid or not.

If only the visible properties were returned by the datasource, the performance would be improved because:
- The response of the datasource will be smaller, so it will take less to reach the client.
- The datasource will avoid exporting all the properties that will not be sent to the grid, meaning it will be less loaded
- Open any window
- Hide all the columns of the header grid but one.
- Open the developers tool.
- Refresh the grid, and check that the response returns data about all the properties, even if they are not shown.
Performance
related to defect 0024402 closed AugustoMauch API Change: When the datasource is called from the grid, only the visible columns are fetched 
related to defect 0024504 closed AugustoMauch Buttons are not showing the correct name 
related to defect 0024502 closed AugustoMauch TestRegistry object changes to "undefined" causing the selenium tests to fail 
related to defect 0025666 closed AugustoMauch "0" rate values are changed to the last integer while moving down in the Tax Rate window. 
related to defect 0028454 closed alostale can't nullify fields when 1st edition is in grid 
related to defect 00304363.0PR16Q1 closed caristu The "Description" column appears empty when adding it in a Saved view 
related to design defect 0036166 acknowledged platform Cannot add a product to a commission line if Currency is not shown in header 
causes defect 00283793.0PR15Q2 closed AugustoMauch Unexpected behavior after setting some fields from a process definition 
diff issue24403.diff (16,802) 2013-07-23 16:14
https://issues.openbravo.com/file_download.php?file_id=6282&type=bug
csv summaryWithFix.csv (412) 2013-07-23 16:32
https://issues.openbravo.com/file_download.php?file_id=6283&type=bug
csv summaryWithoutFix.csv (414) 2013-07-23 16:32
https://issues.openbravo.com/file_download.php?file_id=6284&type=bug
diff issue24403_2.diff (1,424) 2013-08-19 14:07
https://issues.openbravo.com/file_download.php?file_id=6324&type=bug
Issue History
2013-07-23 15:59AugustoMauchNew Issue
2013-07-23 15:59AugustoMauchAssigned To => AugustoMauch
2013-07-23 15:59AugustoMauchModules => Core
2013-07-23 15:59AugustoMauchTriggers an Emergency Pack => No
2013-07-23 16:13AugustoMauchNote Added: 0060179
2013-07-23 16:14AugustoMauchFile Added: issue24403.diff
2013-07-23 16:14AugustoMauchNote Added: 0060180
2013-07-23 16:32AugustoMauchFile Added: summaryWithFix.csv
2013-07-23 16:32AugustoMauchFile Added: summaryWithoutFix.csv
2013-07-23 16:42AugustoMauchNote Added: 0060182
2013-07-23 16:44AugustoMauchRelationship addedrelated to 0024402
2013-08-02 13:01alostaleTag Attached: Performance
2013-08-06 17:02hgbotCheckin
2013-08-06 17:02hgbotNote Added: 0060514
2013-08-06 17:02hgbotStatusnew => resolved
2013-08-06 17:02hgbotResolutionopen => fixed
2013-08-06 17:02hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/1724b65a331afd098e176bd059ba6a967512ae72 [^]
2013-08-06 17:04alostaleNote Added: 0060515
2013-08-06 17:04alostaleStatusresolved => closed
2013-08-06 17:04alostaleFixed in Version => 3.0MP27
2013-08-07 16:18alostaleRelationship addedrelated to 0024504
2013-08-07 16:18alostaleRelationship addedrelated to 0024502
2013-08-07 16:27hgbotCheckin
2013-08-07 16:27hgbotNote Added: 0060534
2013-08-07 16:28alostaleNote Added: 0060538
2013-08-07 16:28alostaleStatusclosed => new
2013-08-07 16:28alostaleResolutionfixed => open
2013-08-07 16:28alostaleFixed in Version3.0MP27 =>
2013-08-16 20:31hudsonbotCheckin
2013-08-16 20:31hudsonbotNote Added: 0060630
2013-08-16 20:32hudsonbotCheckin
2013-08-16 20:32hudsonbotNote Added: 0060635
2013-08-19 14:07AugustoMauchFile Added: issue24403_2.diff
2013-08-26 12:42AugustoMauchTarget Version3.0MP27 => 3.0MP28
2013-09-18 13:43AugustoMauchTarget Version3.0MP28 => 3.0MP29
2013-10-07 17:24AugustoMauchIssue Monitored: alostale
2013-10-07 17:24AugustoMauchReview Assigned To => alostale
2013-10-07 17:27hgbotCheckin
2013-10-07 17:27hgbotNote Added: 0061593
2013-10-07 17:27hgbotStatusnew => resolved
2013-10-07 17:27hgbotResolutionopen => fixed
2013-10-07 17:27hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/1724b65a331afd098e176bd059ba6a967512ae72 [^] => http://code.openbravo.com/erp/devel/pi/rev/94d0fb15191969d20c2f89b919bec8a95ad33110 [^]
2013-10-16 19:46hudsonbotCheckin
2013-10-16 19:46hudsonbotNote Added: 0061731
2013-10-29 16:58alostaleNote Added: 0061944
2013-10-29 16:58alostaleStatusresolved => closed
2013-10-29 16:58alostaleFixed in Version => 3.0MP29
2014-02-05 17:59AugustoMauchRelationship addedrelated to 0025666
2014-12-19 09:25alostaleRelationship addedrelated to 0028454
2015-01-07 10:10alostaleRelationship addedcauses 0028379
2015-11-12 10:14caristuRelationship addedrelated to 0030436
2017-06-22 17:25caristuRelationship addedrelated to 0036166

Notes
(0060179)
AugustoMauch   
2013-07-23 16:13   
Not only the properties that are visible in the grid should be loaded, but also:
- The id of the records
- All those properties that are part of display logic of process buttons
(0060180)
AugustoMauch   
2013-07-23 16:14   
A patch has been attached. It will be pushed for MP27.
(0060182)
AugustoMauch   
2013-07-23 16:42   
The results of two JMeter tests have been attached. Both of them operate on the same data, the different being that only one of them has been done with the patch applied.

The tests have been done using only tables that contained data (the performance of empty tables is not affected by this fix).

The average average response size in bytes is reduced from 52051 to 26366, and the average response time in miliseconds is down from 141 to 41.
(0060514)
hgbot   
2013-08-06 17:02   
Repository: erp/devel/pi
Changeset: 1724b65a331afd098e176bd059ba6a967512ae72
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Jul 30 13:06:50 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/1724b65a331afd098e176bd059ba6a967512ae72 [^]

Fixes issue 24403: Datasource returns to grid the minimum amount of properties

When a grid in a generated window makes a fetch request to its datasource, the datasource now returns the minimum amount of properties, that is:
- Properties that are part of the entity identifier
- Properties currently displayed in the grid
- Properties that are part of the display logic of toolbar buttons

Summary of changes:
- ob-view-grid.js.ftl: It contains the list of properties the always have to be fetched from the datasource regardless of the properties shown in the grid
- OBViewFieldHandler.java: Stores the list of properties that are part of the display logic of buttons
- OBViewGridComponent.java: Returns the list of properties that are part of the entity identifier or that are part of the display logic of a button.
- ob-view-form: in the call to the FIC, include the list of fields that are shown in the grid.
- FormInitializationComponent.java: In the setValuesInRequest method,
  * fetch from the database the values of all columns, not only of the columns that have an associated field
  * do not try to overwrite the values of the properties not shown in the grid with the values stored in the request
- ob-view-grid.js:
  * When a new column in shown in the grid make a request to the datasource
  * Do not allow to show a new column in the grid if it is being edited
  * When making a request to the datasource, include the required properties in the request. This is not applied if the datasource is being called to export the grid.
  * Added methods to be able to process the FIC return (used in ob-standard-view.js)
- ob-standard-view.js
  * When a grid record is edited, make a call to the FIC in EDIT mode (it used to be done in SETSESSION mode). It needs to be done in EDIT mode to obtain the values of the records that are not shown in the grid but are shown in the form.

---
M modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MESSAGE.xml
M modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-view-grid.js.ftl
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewFieldHandler.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewGridComponent.java
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/grid/ob-grid.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
---
(0060515)
alostale   
2013-08-06 17:04   
Reviewed + tested
(0060534)
hgbot   
2013-08-07 16:27   
Repository: erp/devel/pi
Changeset: 8b3d1a079183a8132c233d52b48014f492d2c530
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed Aug 07 16:26:59 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/8b3d1a079183a8132c233d52b48014f492d2c530 [^]

fixed bug 24504, fixed bug 24502, related to bug 24403, related to bug 24402

  Backout of fix for issue 0024403 as it creates regressions 0024504 and 0024502

---
M modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MESSAGE.xml
M modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-view-grid.js.ftl
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewFieldHandler.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewGridComponent.java
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/grid/ob-grid.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
---
(0060538)
alostale   
2013-08-07 16:28   
Reopening this issue because it has been backed out because it created regressions 0024504 and 0024502.
(0060630)
hudsonbot   
2013-08-16 20:31   
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/59a1180e7f4f [^]

Maturity status: Test
(0060635)
hudsonbot   
2013-08-16 20:32   
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/59a1180e7f4f [^]

Maturity status: Test
(0061593)
hgbot   
2013-10-07 17:27   
Repository: erp/devel/pi
Changeset: 94d0fb15191969d20c2f89b919bec8a95ad33110
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Oct 07 17:17:08 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/94d0fb15191969d20c2f89b919bec8a95ad33110 [^]

Fixes bug 24402, fixes bug 24403: Grid Datasource load minimum property set

Changes with respect to changeset 20851:
- In the FIC, do not try to set in the session the values of properties that are empty in the request due to being shown only in grid view. In this case the value that will prevail will be the one present in the database.
- New mandatory property fields:
      * Client and organization
      * Button fields with label values
      * Link to parent properties
- In the grid, do not detect as a change if a value change from undefined to not undefined. Otherwise, when the user opens a record in form view the record would appear as changed. This happens because the properties that are present in the form but not in the grid change from undefined to not undefined.
- The fieldStateChanged function has been deleted. This function handled the case when the user added a new column to the grid while it was being edited. This action is no longer allowed, so the function serves no purpose.
- The FIC call in the setContextInfo has been changed from SETSESSION to EDIT, because now in the response we need the values of all the view fields, not only the shown in the grid. A callback has been defined to apply this new values to the grid.

---
M modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MESSAGE.xml
M modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-view-grid.js.ftl
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewFieldHandler.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewGridComponent.java
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/grid/ob-grid.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view-datasource.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js
---
(0061731)
hudsonbot   
2013-10-16 19:46   
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/51315988909a [^]

Maturity status: Test
(0061944)
alostale   
2013-10-29 16:58   
Code reviewed + verified