Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030064Openbravo ERPA. Platformpublic2015-06-01 13:522015-06-15 10:15
alostale 
AugustoMauch 
immediateminorhave not tried
closedfixed 
5
 
3.0PR15Q1.53.0PR15Q1.5 
alostale
Core
Production - Confirmed Stable
2014-11-19
3.0PR15Q1
https://code.openbravo.com/erp/devel/pi/rev/3221fd5a8661d7f9dfbfd6d4255bace9834e6535 [^]
No
0030064: 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.
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
   
Approved
blocks defect 0030062 closed AugustoMauch grid is not completely loaded after refresh in some cases 
Issue History
2015-06-01 13:55alostaleTypedefect => backport
2015-06-01 13:55alostaleTarget Version => 3.0PR15Q1.5
2015-06-01 14:00alostaleAssigned Toplatform => AugustoMauch
2015-06-03 10:38dmitry_mezentsevTag Attached: Approved
2015-06-04 15:14AugustoMauchIssue Monitored: alostale
2015-06-04 15:14AugustoMauchReview Assigned To => alostale
2015-06-04 15:38hgbotCheckin
2015-06-04 15:38hgbotNote Added: 0078079
2015-06-04 15:38hgbotStatusscheduled => resolved
2015-06-04 15:38hgbotResolutionopen => fixed
2015-06-04 15:38hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR15Q1.5/rev/161cae7de3fab1b3bbc8ae0a2a84d428dbcc3172 [^]
2015-06-15 10:15alostaleNote Added: 0078285
2015-06-15 10:15alostaleStatusresolved => closed
2015-06-15 10:15alostaleFixed in Version => 3.0PR15Q1.5

Notes
(0078079)
hgbot   
2015-06-04 15:38   
Repository: erp/backports/3.0PR15Q1.5
Changeset: 161cae7de3fab1b3bbc8ae0a2a84d428dbcc3172
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu Jun 04 14:54:06 2015 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR15Q1.5/rev/161cae7de3fab1b3bbc8ae0a2a84d428dbcc3172 [^]

Fixes issue 30064: 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
---
(0078285)
alostale   
2015-06-15 10:15   
code reviewed + tested