Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0023889Openbravo ERPA. Platformpublic2013-05-22 23:062014-06-25 01:35
egoitz 
AugustoMauch 
urgentmajorhave not tried
closedfixed 
5
 
3.0MP243.0MP24 
shankarb
Core
No
0023889: When searching on the field of a new selector the request to the datasource is done twice
When searching on the field of a new selector the request to the datasource is done twice.
If there are less that 76 rows both request are done using limit $1
if there are more than 76 request the first request is using limit 76
and the second limit 76 offset 75
-Change the log of postgresql to see al the selects executed.
-Open the sales order window
-Openbravo the lines tab
-Create a new row.
-Write a value on the product field, for example a.
*See that on the log there are two selects for the product selector
Performance
related to design defect 0023623 new dmiguelez Performance problem in product selector 
related to defect 00238903.0MP24 closed AugustoMauch Bad behaviour on grid view when searching on a selector field if the selector has defined a diplayed field 
related to defect 0026911 closed AugustoMauch The request to the datasource are done several times when opening a selector from a 2.50 process popup 
related to defect 00284723.0PR15Q2 closed alostale multi requests to datasource in big FK filter drop down 
Issue History
2013-05-22 23:06egoitzNew Issue
2013-05-22 23:06egoitzAssigned To => AugustoMauch
2013-05-22 23:06egoitzModules => Core
2013-05-22 23:06egoitzTriggers an Emergency Pack => No
2013-05-22 23:06egoitzTag Attached: Performance
2013-05-22 23:58egoitzRelationship addedrelated to 0023890
2013-05-23 00:00egoitzRelationship addedrelated to 0023623
2013-05-23 02:06eintelauIssue Monitored: eintelau
2013-05-28 12:38AugustoMauchIssue Monitored: shankarb
2013-05-28 12:38AugustoMauchReview Assigned To => shankarb
2013-05-28 12:46hgbotCheckin
2013-05-28 12:46hgbotNote Added: 0058986
2013-05-28 12:46hgbotStatusnew => resolved
2013-05-28 12:46hgbotResolutionopen => fixed
2013-05-28 12:46hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a569477afae52236a353f0cc4b906bc056ed0c32 [^]
2013-05-28 12:51AugustoMauchNote Added: 0058987
2013-06-01 02:14hudsonbotCheckin
2013-06-01 02:14hudsonbotNote Added: 0059091
2013-06-02 13:05shankarbNote Added: 0059117
2013-06-02 13:05shankarbStatusresolved => closed
2013-06-02 13:05shankarbFixed in Version => 3.0MP24
2014-06-20 10:13AugustoMauchRelationship addedrelated to 0026911
2014-06-20 11:43hgbotCheckin
2014-06-20 11:44hgbotNote Added: 0068214
2014-06-20 11:44hgbotStatusclosed => resolved
2014-06-20 11:44hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/a569477afae52236a353f0cc4b906bc056ed0c32 [^] => http://code.openbravo.com/erp/devel/pi/rev/032fb3d553637702f5d14a6b0b2e8f8f23bf1c68 [^]
2014-06-20 11:44AugustoMauchNote Added: 0068215
2014-06-20 11:44AugustoMauchStatusresolved => closed
2014-06-25 01:35hudsonbotCheckin
2014-06-25 01:35hudsonbotNote Added: 0068289
2014-12-23 09:06alostaleRelationship addedrelated to 0028472

Notes
(0058986)
hgbot   
2013-05-28 12:46   
Repository: erp/devel/pi
Changeset: a569477afae52236a353f0cc4b906bc056ed0c32
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue May 28 12:46:06 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a569477afae52236a353f0cc4b906bc056ed0c32 [^]

Fixes issue 23889: No extra datasource calls are done by selectors

Pick lists and grids use a property called drawAllMaxCells, that is used to determine how many cells should be fetched from the datasource, its default value is 250. If after making a datasource call smartclient finds out that the number of retrieved cells is lower than drawAllMaxCells, it will do another datasource call, and repeat this process until the number of cells fetched are higher than drawAllMaxCells or until all cells have been fetched.

This is not the intented behaviour, we want the rows to be fetched when the user scrolls down and is out of cached rows. That is why in the definition of OBViewGrid the drawAllMaxCells is set to 0. To fix this issue this property is also set to 0 in the selector pick list and grid.

---
M modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
---
(0058987)
AugustoMauch   
2013-05-28 12:51   
Test plan:
- Create a selector based on the c_country table
- Create a new column in the c_uom table called c_country_id, varchar 32
- Add the column to the application dictionary and associate it with the new selector
- Add the field to the application dictionary.
- Compile and restart tomcat

- Open the Unit of Measure window, open the debugger window
- Create a new record
- Empty the content of the c_country_id field, and press space. Check in the debugger that only one call to the Country table is done (before the fix 4 were done)
- Open the selector grid. Check that only one call to the Country table is done (2 used to be done)
(0059091)
hudsonbot   
2013-06-01 02:14   
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/31f9b82dde77 [^]

Maturity status: Test
(0059117)
shankarb   
2013-06-02 13:05   
Code reviewed and tested in pi changeset f0878dbca750
(0068214)
hgbot   
2014-06-20 11:43   
Repository: erp/devel/pi
Changeset: 032fb3d553637702f5d14a6b0b2e8f8f23bf1c68
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Fri Jun 20 11:42:57 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/032fb3d553637702f5d14a6b0b2e8f8f23bf1c68 [^]

Fixes issue 23889: Multiple requests to selector datasource in manual popups

Pick lists and grids use a property called drawAllMaxCells, that is used to determine how many cells should be fetched from the datasource, its default value is 250. If after making a datasource call smartclient finds out that the number of retrieved cells is lower than drawAllMaxCells, it will do another datasource call, and repeat this process until the number of cells fetched are higher than drawAllMaxCells or until all cells have been fetched.

This is not the intented behaviour, we want the rows to be fetched when the user scrolls down and is out of cached rows. This is achieved by setting drawAllMaxCells to 0.

---
M modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-widget.js
---
(0068215)
AugustoMauch   
2014-06-20 11:44   
This issue was reopened accidentally.
(0068289)
hudsonbot   
2014-06-25 01:35   
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/e78ccbaf0186 [^]
Maturity status: Test