Openbravo Issue Tracking System - Retail Modules
View Issue Details
0033519Retail ModulesWeb POSpublic2016-07-21 11:202016-12-16 13:41
marvintm 
ranjith_qualiantech_com 
normalmajorsometimes
closedfixed 
5
 
 
marvintm
Production - Confirmed Stable
2015-04-30
RR15Q2
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/a950157be0006f2e3f023f64d8ab1e9a9b2bb99a [^]
No
0033519: Masterdata loading fails when pagination is used
The Web POS loads masterdata models using pagination, which means that if there are many records (currently, more than 35000) in a given model, the first 35000 will be loaded, and then the next 35000, and so on, until all of them are loaded.

Currently, this mechanism is failing in some cases, so that if there are more than 35000 records in a model, some of them are not loaded in the Web POS.
There are two ways to reproduce the problem:

- Find a database with many records (more than 35000 in one model, for example products or business partners). Log in the Web POS, and verify that not all records are in the local database.

An easier way (and advisable for the developer who will be fixing the problem) is the following:
- Log in the Web POS, go to Chrome Developer Tools, and execute the query in the local database:
select count(*) from m_product
Verify that there are 164 records in the table.
- Then, go to file ob-datasource.js.
- Find this line:
handleIncrementalRequest(35000, 0, params, incremental);
and change it to:
handleIncrementalRequest(20, 0, params, incremental);
- Clear cache and log in the Web POS again.
- Execute the same query in the local database. Verify that there are 162 products. There were two products lost at some point, and this is wrong.
No tags attached.
depends on backport 0033524RR16Q2.2 closed ranjith_qualiantech_com Masterdata loading fails when pagination happens 
depends on backport 0033536RR16Q3 closed ranjith_qualiantech_com Masterdata loading fails when pagination happens 
caused by defect 0028428RR15Q3 closed aaroncalero Improve master data loading of WebPOS 
causes defect 0034669RR17Q1 closed migueldejuana ProcessHQLQuery returns duplicates causing errors when inserting data and really slow login with many products 
Issue History
2016-07-21 11:20marvintmNew Issue
2016-07-21 11:20marvintmAssigned To => Retail
2016-07-21 11:20marvintmTriggers an Emergency Pack => No
2016-07-21 11:21marvintmStatusnew => acknowledged
2016-07-21 12:38OrekariaStatusacknowledged => scheduled
2016-07-21 12:38OrekariaStatusscheduled => acknowledged
2016-07-25 11:11ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2016-07-25 11:12ranjith_qualiantech_comStatusacknowledged => scheduled
2016-07-26 09:30marvintmStatusscheduled => acknowledged
2016-07-26 09:30marvintmStatusacknowledged => scheduled
2016-07-26 11:27hgbotCheckin
2016-07-26 11:27hgbotNote Added: 0088663
2016-07-26 11:27hgbotStatusscheduled => resolved
2016-07-26 11:27hgbotResolutionopen => fixed
2016-07-26 11:27hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/c8dfc96d4a92aad6486c6241410effa49a14d6a8 [^]
2016-07-26 11:58marvintmSummaryMasterdata loading fails when pagination happens => Masterdata loading fails when pagination is used
2016-07-26 11:58marvintmSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=12740#r12740
2016-07-26 12:01marvintmRegression level => Production - Confirmed Stable
2016-07-26 12:01marvintmRegression date => 2015-04-30
2016-07-26 12:01marvintmRegression introduced in release => RR15Q2
2016-07-26 12:01marvintmRegression introduced by commit => https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/a950157be0006f2e3f023f64d8ab1e9a9b2bb99a [^]
2016-07-26 12:18dmitry_mezentsevRelationship addedcaused by 0028428
2016-08-04 11:59marvintmReview Assigned To => marvintm
2016-08-04 11:59marvintmStatusresolved => closed
2016-12-01 16:38mtaalRelationship addedcauses 0034669
2016-12-16 13:41hgbotCheckin
2016-12-16 13:41hgbotNote Added: 0092495

Notes
(0088663)
hgbot   
2016-07-26 11:27   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: c8dfc96d4a92aad6486c6241410effa49a14d6a8
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Jul 26 14:57:12 2016 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/c8dfc96d4a92aad6486c6241410effa49a14d6a8 [^]

Fixes issue 33519 : Reset hqlquery offset if the model has multiple queries

- for a model which has multiple queries, hqlquery offset value has to be resetted if last query counted rows doesn't exceed the limit rows

---
M src/org/openbravo/mobile/core/process/ProcessHQLQuery.java
---
(0092495)
hgbot   
2016-12-16 13:41   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 6151c54f767b65b8c90ea1cdc324a15a40f27055
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Thu Dec 15 13:55:25 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/6151c54f767b65b8c90ea1cdc324a15a40f27055 [^]

Related to issue 0033519 and related to issue 0034669

Backed out changeset c8dfc96d4a92

- This changeset is not needed, offset is not needed to update in non-masterdata queries. In fact it breaks recalculation of limit using totalRows instead of queryRows

---
M src/org/openbravo/mobile/core/process/ProcessHQLQuery.java
---