Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030063Openbravo ERPA. Platformpublic2015-06-01 13:522015-06-15 10:14
alostale 
AugustoMauch 
immediateminorhave not tried
closedfixed 
5
 
3.0PR15Q2.23.0PR15Q2.2 
alostale
Core
Production - Confirmed Stable
2014-11-19
3.0PR15Q1
https://code.openbravo.com/erp/devel/pi/rev/3221fd5a8661d7f9dfbfd6d4255bace9834e6535 [^]
No
0030063: 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
caused by design defect 0025811 closed AugustoMauch unnecessary request on grid refresh 
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.0PR15Q2.2
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: 0078078
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.0PR15Q2.2/rev/32495ca01568ccb55bfcbe1357510afc9cf4c35a [^]
2015-06-10 15:30alostaleRelationship addedcaused by 0025811
2015-06-15 10:14alostaleNote Added: 0078284
2015-06-15 10:14alostaleStatusresolved => closed
2015-06-15 10:14alostaleFixed in Version => 3.0PR15Q2.2

Notes
(0078078)
hgbot   
2015-06-04 15:38   
Repository: erp/backports/3.0PR15Q2.2
Changeset: 32495ca01568ccb55bfcbe1357510afc9cf4c35a
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.0PR15Q2.2/rev/32495ca01568ccb55bfcbe1357510afc9cf4c35a [^]

Fixes issue 30063: 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
---
(0078284)
alostale   
2015-06-15 10:14   
code reviewed and tested