Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030062Openbravo ERPA. Platformpublic2015-06-01 13:522015-06-10 15:36
alostale 
AugustoMauch 
immediateminorhave not tried
closedfixed 
5
 
3.0PR15Q3 
alostale
Core
Production - Confirmed Stable
2014-11-19
3.0PR15Q1
https://code.openbravo.com/erp/devel/pi/rev/3221fd5a8661d7f9dfbfd6d4255bace9834e6535 [^]
No
0030062: grid is not completely loaded after refresh in some cases
Grid is not completely loaded after refreshing it having a record selected and scrolling down to a different page.

Workaround: to get the full grid again unselect selected record and refresh it again
1. Open Country and Region window (check grid is sorted by ISO code)
2. Select first country in the list (Andorra)
3. Scroll down until next page is requested
4. Click the refresh button. Grid is scrolled up again to display selected country -> OK
5. Scroll down till last record in the current page (India), there are 2 problems:
  -> grid shows to empty lines after India
  -> there is no extra request to continue loading missing records
   
No tags attached.
depends on backport 00300633.0PR15Q2.2 closed AugustoMauch grid is not completely loaded after refresh in some cases 
depends on backport 00300643.0PR15Q1.5 closed AugustoMauch grid is not completely loaded after refresh in some cases 
caused by design defect 0025811 closed AugustoMauch unnecessary request on grid refresh 
png Selection_217.png (74,746) 2015-06-01 13:54
https://issues.openbravo.com/file_download.php?file_id=8147&type=bug
png
Issue History
2015-06-01 13:52alostaleNew Issue
2015-06-01 13:52alostaleAssigned To => platform
2015-06-01 13:52alostaleModules => Core
2015-06-01 13:52alostaleRegression level => Production - Confirmed Stable
2015-06-01 13:52alostaleRegression date => 2014-11-19
2015-06-01 13:52alostaleRegression introduced in release => 3.0PR15Q1
2015-06-01 13:52alostaleRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/3221fd5a8661d7f9dfbfd6d4255bace9834e6535 [^]
2015-06-01 13:52alostaleTriggers an Emergency Pack => No
2015-06-01 13:52alostaleRelationship addedcaused by 0025811
2015-06-01 13:54alostaleFile Added: Selection_217.png
2015-06-01 13:55alostaleStatusnew => scheduled
2015-06-01 13:55alostaleAssigned Toplatform => AugustoMauch
2015-06-01 13:55alostaleDescription Updatedbug_revision_view_page.php?rev_id=8721#r8721
2015-06-04 14:57AugustoMauchIssue Monitored: alostale
2015-06-04 14:57AugustoMauchReview Assigned To => alostale
2015-06-04 14:59hgbotCheckin
2015-06-04 14:59hgbotNote Added: 0078076
2015-06-04 14:59hgbotStatusscheduled => resolved
2015-06-04 14:59hgbotResolutionopen => fixed
2015-06-04 14:59hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/82e40910201df9cf2a2e79a285b61407a6fefcea [^]
2015-06-05 01:33hudsonbotCheckin
2015-06-05 01:33hudsonbotNote Added: 0078106
2015-06-10 15:36alostaleNote Added: 0078180
2015-06-10 15:36alostaleStatusresolved => closed
2015-06-10 15:36alostaleFixed in Version => 3.0PR15Q3

Notes
(0078076)
hgbot   
2015-06-04 14:59   
Repository: erp/devel/pi
Changeset: 82e40910201df9cf2a2e79a285b61407a6fefcea
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu Jun 04 14:54:06 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/82e40910201df9cf2a2e79a285b61407a6fefcea [^]

Fixes issue 30062: Grid is properly loaded after refreshing with a selected row

The problem was caused by this code (the this attribute is a ResultSet), which is contained in the fetchRemoteData function:

      } else if (this.grid.refreshingWithSelectedRecord) {
        // if the grid was refreshed with a record selected, use the range that contained that record
        // instead of using targetRecordId to improve the performance
        startRow = this.grid.selectedRecordInitInterval;
        endRow = this.grid.selectedRecordEndInterval;
      }

If the grid is refreshed while one of its records is selected, then the startRow and endRow will be set so that the requested page contains the selected record. The problem was that the ResultSet.localData attribute was not being properly set, as at this points it was expected to contain the 'loading' value for all the rows that are being requested. As a result of this the localData attribute became malformed when the response was processed, and this caused the grid to misbehave.

To fix this, the localData is configured to wait for the proper records:

        this.localData = [];
        this.setRangeLoading(startRow, endRow);

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
---
(0078106)
hudsonbot   
2015-06-05 01:33   
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/aa05c3f56c97 [^]
Maturity status: Test
(0078180)
alostale   
2015-06-10 15:36   
code reviewed

tested with single and multiple records selected