Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0024802Openbravo ERPA. Platformpublic2013-09-19 21:092022-02-01 08:05
naiaramartinez 
Triage Platform Base 
normalminorhave not tried
acknowledgedopen 
5
 
 
AugustoMauch
Core
No
0024802: Incorrect rowcount
During testing of the Openbravo smoke test (pi-smoke) we’ve discovered that the select method in OBStandardView is looking for a RecordCount in the Grid before selecting a row item, but if there is a delay in loading data, the value is incorrect, causing the test to throw an Exception.
 
For example, let’s say you open the Sales Order window, the initial filter shows 15 rows. Then, when you “Clear Filter”, the Grid shows “Loading data…”, but the row count is still 15.When the test code goes to retrieve the RecordCount value, it returns a value of 15, then when it goes to select a row, an exception is thrown because there are no rows displayed.

We resolved this issue by modifying the dataArrived function inside modules\org.openbravo.client.application\web\org.openbravo.client.application\js\grid\ob-view-grid.js by clearing the RecordCount value before the new data is loaded. The modified file is attached.
For example, let’s say you open the Sales Order window, the initial filter shows 15 rows. Then, when you “Clear Filter”, the Grid shows “Loading data…”, but the row count is still 15.When the test code goes to retrieve the RecordCount value, it returns a value of 15, then when it goes to select a row, an exception is thrown because there are no rows displayed.
The file is attached with the proposed solution
No tags attached.
? ob-view-grid.js (128,979) 2013-09-19 21:09
https://issues.openbravo.com/file_download.php?file_id=6420&type=bug
Issue History
2013-09-19 21:09naiaramartinezNew Issue
2013-09-19 21:09naiaramartinezAssigned To => AugustoMauch
2013-09-19 21:09naiaramartinezFile Added: ob-view-grid.js
2013-09-19 21:09naiaramartinezModules => Core
2013-09-19 21:09naiaramartinezTriggers an Emergency Pack => No
2013-10-21 18:53shankarbAssigned ToAugustoMauch => shankarb
2013-10-24 09:35shankarbIssue Monitored: AugustoMauch
2013-10-24 09:35shankarbReview Assigned To => AugustoMauch
2013-10-24 09:41hgbotCheckin
2013-10-24 09:41hgbotNote Added: 0061879
2013-10-24 09:41hgbotStatusnew => resolved
2013-10-24 09:41hgbotResolutionopen => fixed
2013-10-24 09:41hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/fff6d1f95d3cf19efd98f76926f7a9dc141aa575 [^]
2013-10-24 11:01hgbotCheckin
2013-10-24 11:01hgbotNote Added: 0061882
2013-10-24 20:04hudsonbotCheckin
2013-10-24 20:04hudsonbotNote Added: 0061894
2013-10-24 20:04hudsonbotCheckin
2013-10-24 20:04hudsonbotNote Added: 0061897
2013-10-25 08:38hgbotCheckin
2013-10-25 08:38hgbotNote Added: 0061898
2013-10-25 08:41shankarbNote Added: 0061899
2013-10-25 08:41shankarbStatusresolved => new
2013-10-25 08:41shankarbResolutionfixed => open
2013-10-25 17:44hudsonbotCheckin
2013-10-25 17:44hudsonbotNote Added: 0061911
2014-09-03 08:14shankarbAssigned Toshankarb => AugustoMauch
2015-03-17 14:38alostaleAssigned ToAugustoMauch => platform
2015-11-10 15:09alostaleStatusnew => acknowledged
2019-10-22 12:54AugustoMauchIssue End Monitor: AugustoMauch
2022-02-01 08:05alostaleAssigned Toplatform => Triage Platform Base

Notes
(0061879)
hgbot   
2013-10-24 09:41   
Repository: erp/devel/pi
Changeset: fff6d1f95d3cf19efd98f76926f7a9dc141aa575
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Thu Oct 24 13:09:55 2013 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/fff6d1f95d3cf19efd98f76926f7a9dc141aa575 [^]

Fixes Issue 0024802: Incorrect rowcount

The updateRowCountDisplay has a delay associated with it,
so prevent returning incorrect row count if there a request while on delay.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
---
(0061882)
hgbot   
2013-10-24 11:01   
Repository: erp/devel/pi
Changeset: 491a3b333503e48c12a5d48f565c209243d52866
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Thu Oct 24 14:27:52 2013 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/491a3b333503e48c12a5d48f565c209243d52866 [^]

Related to Issue 24802 : Checked form availability before updating row count.

Updating the row count to null only if filter editor and editForm are available.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
---
(0061894)
hudsonbot   
2013-10-24 20:04   
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/d0465c5073ba [^]

Maturity status: Test
(0061897)
hudsonbot   
2013-10-24 20:04   
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/d0465c5073ba [^]

Maturity status: Test
(0061898)
hgbot   
2013-10-25 08:38   
Repository: erp/devel/pi
Changeset: a7117f83ff8ff45cc0cdc6770c23a038ee2d570e
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Fri Oct 25 12:05:24 2013 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/a7117f83ff8ff45cc0cdc6770c23a038ee2d570e [^]

Backout issue 24802: Backout fix pushed for this issue

The fix for this issue has been backed out. Will be fixed using a different approach.
The problem is currently fixed by clear the value of row count after the data has arrived.
But the ideal solution will be to clear it when fetching the records itself.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
---
(0061899)
shankarb   
2013-10-25 08:41   
Fix backedout in changeset https://code.openbravo.com/erp/devel/pi/rev/a7117f83ff8f [^]
(0061911)
hudsonbot   
2013-10-25 17:44   
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/156e0398fda4 [^]

Maturity status: Test