Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029839Openbravo ERPA. Platformpublic2015-05-11 09:312015-05-15 11:26
AugustoMauch 
AugustoMauch 
immediatemajorhave not tried
closedfixed 
5
 
3.0PR15Q1.43.0PR15Q1.4 
alostale
Core
Production - Confirmed Stable
2014-11-19
3.0PR15Q1
https://code.openbravo.com/erp/devel/pi/rev/3221fd5a8661d7f9dfbfd6d4255bace9834e6535 [^]
No
0029839: Unlimited grid datasource request under certain circumstances
If the user scrolls down a grid till reaching the second page, and then performs a filter that returns less than a page, the filtered records will be shown but an unlimited amoutn of grid requests will be done until the user closes the window.
- Open the Country and Region window
- Scroll down until you see Iraq
- Open the browser developer tools and select the Network tab
- Enter Q in the name filter editor
- The names that contain Q will be displayed, but the grid will show empty lines for more rows. Also, unlimited requests to the Country datasource will be done, you can check it in the developer tools
Approved
blocks defect 0029835 closed AugustoMauch Unlimited grid datasource request under certain circumstances 
Issue History
2015-05-11 10:19AugustoMauchTypedefect => backport
2015-05-11 10:19AugustoMauchTarget Version => 3.0PR15Q1.4
2015-05-11 11:28dmitry_mezentsevTag Attached: Approved
2015-05-12 22:33AugustoMauchIssue Monitored: alostale
2015-05-12 22:33AugustoMauchReview Assigned To => alostale
2015-05-12 22:34hgbotCheckin
2015-05-12 22:34hgbotNote Added: 0077361
2015-05-12 22:34hgbotStatusscheduled => resolved
2015-05-12 22:34hgbotResolutionopen => fixed
2015-05-12 22:34hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR15Q1.4/rev/d4b570009f3e21ed3fab8ece6bcdf45a892b9d08 [^]
2015-05-13 17:28alostaleAssigned Toplatform => AugustoMauch
2015-05-15 11:26alostaleNote Added: 0077485
2015-05-15 11:26alostaleStatusresolved => closed
2015-05-15 11:26alostaleFixed in Version => 3.0PR15Q1.4

Notes
(0077361)
hgbot   
2015-05-12 22:34   
Repository: erp/backports/3.0PR15Q1.4
Changeset: d4b570009f3e21ed3fab8ece6bcdf45a892b9d08
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon May 11 10:53:02 2015 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR15Q1.4/rev/d4b570009f3e21ed3fab8ece6bcdf45a892b9d08 [^]

Fixes bug 29839: Prevents unlimited datasource requests when filtering the grid

The problem was that the logic to check that if a datasource request was triggered by scrolling up in a grid that did not have its initial rows loaded (see [1]) did not work well when the user filtered the grid after having scrolled down the grid till loading its second page. This caused the totalRows property of the grid to be miscalculated, and this triggered the undefinite amount of datasource requests.

The logic to check if the request was triggered by scrolling up has been changed. Now, instead of checking low-level smartclient properties like lastScrollTop, we check if there are rows loaded in the positions just after the page that was just received. Only in that case we want to prevent resetting the totalRows property of the ResultSet with the value returned by the datasource.

[1] https://code.openbravo.com/erp/devel/pi/rev/c51dce7e9fd3c47915464ab4f565a9d1cee60e3b [^]

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
---
(0077485)
alostale   
2015-05-15 11:26   
code reviewed + tested