Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0029835 | Openbravo ERP | A. Platform | public | 2015-05-11 09:31 | 2015-05-15 11:25 |
|
Reporter | AugustoMauch | |
Assigned To | AugustoMauch | |
Priority | immediate | Severity | major | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 3.0PR15Q3 | |
Merge Request Status | |
Review Assigned To | alostale |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | Production - Confirmed Stable |
Regression date | 2014-11-19 |
Regression introduced in release | 3.0PR15Q1 |
Regression introduced by commit | https://code.openbravo.com/erp/devel/pi/rev/3221fd5a8661d7f9dfbfd6d4255bace9834e6535 [^] |
Triggers an Emergency Pack | No |
|
Summary | 0029835: Unlimited grid datasource request under certain circumstances |
Description | 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 amount of grid requests will be done until the user closes the window. |
Steps To Reproduce | - 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 |
Proposed Solution | |
Additional Information | |
Tags | Performance |
Relationships | depends on | backport | 0029838 | 3.0PR15Q2.1 | closed | AugustoMauch | Unlimited grid datasource request under certain circumstances | depends on | backport | 0029839 | 3.0PR15Q1.4 | closed | AugustoMauch | Unlimited grid datasource request under certain circumstances | caused by | design defect | 0025811 | | closed | AugustoMauch | unnecessary request on grid refresh | related to | defect | 0029896 | | closed | AugustoMauch | double grid request when filtering grid after scrolling to 2nd page |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2015-05-11 09:31 | AugustoMauch | New Issue | |
2015-05-11 09:31 | AugustoMauch | Assigned To | => platform |
2015-05-11 09:31 | AugustoMauch | Modules | => Core |
2015-05-11 09:31 | AugustoMauch | Regression level | => Production - Confirmed Stable |
2015-05-11 09:31 | AugustoMauch | Regression date | => 2014-11-19 |
2015-05-11 09:31 | AugustoMauch | Regression introduced in release | => 3.0PR15Q1 |
2015-05-11 09:31 | AugustoMauch | Regression introduced by commit | => https://code.openbravo.com/erp/devel/pi/rev/3221fd5a8661d7f9dfbfd6d4255bace9834e6535 [^] |
2015-05-11 09:31 | AugustoMauch | Triggers an Emergency Pack | => No |
2015-05-11 09:40 | AugustoMauch | Relationship added | caused by 0025811 |
2015-05-11 10:19 | AugustoMauch | Status | new => scheduled |
2015-05-11 10:31 | AugustoMauch | Issue Monitored: alostale | |
2015-05-11 10:31 | AugustoMauch | Review Assigned To | => alostale |
2015-05-11 10:31 | AugustoMauch | Description Updated | bug_revision_view_page.php?rev_id=8497#r8497 |
2015-05-11 10:54 | hgbot | Checkin | |
2015-05-11 10:54 | hgbot | Note Added: 0077267 | |
2015-05-11 10:54 | hgbot | Status | scheduled => resolved |
2015-05-11 10:54 | hgbot | Resolution | open => fixed |
2015-05-11 10:54 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/28a52b693c8184ce50786122fbb88121eab85f46 [^] |
2015-05-11 13:05 | AugustoMauch | Note Added: 0077276 | |
2015-05-11 21:53 | hudsonbot | Checkin | |
2015-05-11 21:53 | hudsonbot | Note Added: 0077314 | |
2015-05-12 16:05 | AugustoMauch | Tag Attached: Performance | |
2015-05-13 10:00 | AugustoMauch | Note Added: 0077367 | |
2015-05-13 17:28 | alostale | Assigned To | platform => AugustoMauch |
2015-05-14 11:01 | alostale | Note Added: 0077434 | |
2015-05-14 11:01 | alostale | Status | resolved => new |
2015-05-14 11:01 | alostale | Resolution | fixed => open |
2015-05-15 09:04 | alostale | Relationship added | related to 0029896 |
2015-05-15 09:04 | alostale | Status | new => scheduled |
2015-05-15 09:04 | alostale | Status | scheduled => resolved |
2015-05-15 09:04 | alostale | Resolution | open => fixed |
2015-05-15 11:25 | alostale | Note Added: 0077483 | |
2015-05-15 11:25 | alostale | Status | resolved => closed |
2015-05-15 11:25 | alostale | Fixed in Version | => 3.0PR15Q3 |
Notes |
|
(0077267)
|
hgbot
|
2015-05-11 10:54
|
|
Repository: erp/devel/pi
Changeset: 28a52b693c8184ce50786122fbb88121eab85f46
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon May 11 10:53:02 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/28a52b693c8184ce50786122fbb88121eab85f46 [^]
Fixes bug 29835: 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
---
|
|
|
|
Probably the easiest way to test this issue is to place a breakpoint in this line:
dsResponse.totalRows = this.localData.length;
and then check that the execution flow only stops there when the user executes the last of these steps:
- Scroll down on a grid until at least the second page is loaded
- Refreshes the grid
- Scrolls up until the page previous to the current one is loaded |
|
|
|
|
|
|
|
|
|
Reopening it: though now unlimited requests issue is fixed, following the steps to reproduce 2 identical requests are performed for Country DS when filtering name by "q" |
|
|
|
core reviewed
closing the issue, though reported case still launches one extra request, the biggest issue which was unlimited number of requests is already fixed.
For this second request (which is not a regression) a new issue (0029896) has been reported. |
|