Openbravo Issue Tracking System - POS2
View Issue Details
0051036POS2Corepublic2022-11-30 09:352022-12-19 08:57
mtaal 
mtaal 
normalmajorhave not tried
closedfixed 
5
 
23Q1 
No
0051036: RM-2721: master data cache contains less data than in indexeddb causing missing data in functionality using the cache
The master data cache contains less data then the database. Some functionality will use the cache and then not find specific data causing the logic to fail. This can happen with any master data but the specific case for which this happened was product data (see RM-)
To reproduce:
goto the pos2 login page (do not login in).
change a product in the backoffice (so it will be loaded by the master data refresh)
find this line in pos2.js (to always force refresh):
      } else if (isNeededIncrementalRefreshOnLogin()) {
change to:
      } else if (true || isNeededIncrementalRefreshOnLogin()) {
set a breakpoint in the loginInitActions before the refresh master data
during login when it stops do this:
OB.App.MasterdataModels.Product.searchCache = []
after the call to loadMasterDataCache in the login init actions js file check that the OB.App.MasterdataModels.Product.searchCache array contains only the product changed in the backoffice but not any other products in the database
Load the master data cache before the refresh of the master data
No tags attached.
Issue History
2022-11-30 09:35mtaalNew Issue
2022-11-30 09:35mtaalAssigned To => mtaal
2022-11-30 09:35mtaalTriggers an Emergency Pack => No
2022-11-30 09:38hgbotNote Added: 0144238
2022-12-01 11:46guilleaerStatusnew => scheduled
2022-12-15 23:02hgbotNote Added: 0144750
2022-12-19 08:46hgbotNote Added: 0144807
2022-12-19 08:46hgbotResolutionopen => fixed
2022-12-19 08:46hgbotStatusscheduled => closed
2022-12-19 08:46hgbotFixed in Version => RR23Q1
2022-12-19 08:46hgbotNote Added: 0144808
2022-12-19 08:57hgbotFixed in VersionRR23Q1 => 23Q1
2022-12-19 08:57hgbotNote Added: 0144809
2022-12-19 08:57hgbotNote Added: 0144810

Notes
(0144238)
hgbot   
2022-11-30 09:38   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/937 [^]
(0144750)
hgbot   
2022-12-15 23:02   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/446 [^]
(0144807)
hgbot   
2022-12-19 08:46   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/446 [^]
(0144808)
hgbot   
2022-12-19 08:46   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: 275c4af8f9af5e9d88bb2405d0f627ef7bcc570f
Author: Martin Taal <martin.taal@openbravo.com>
Date: 19-12-2022 07:46:52
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/275c4af8f9af5e9d88bb2405d0f627ef7bcc570f [^]

Fixed ISSUE-51036: force reload masterdata cache after full reload

---
M web-test/model/masterdata/MasterdataRefresh.test.js
M web/org.openbravo.mobile.core/app/model/masterdata/MasterdataController.js
---
(0144809)
hgbot   
2022-12-19 08:57   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^]
Changeset: 2f46e7499b219568e57a60257faf3332adcabfd2
Author: Martin Taal <martin.taal@openbravo.com>
Date: 19-12-2022 07:57:07
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/2f46e7499b219568e57a60257faf3332adcabfd2 [^]

Fixes ISSUE-51036: cache misses data present in the database, move logic to mobile core to ensure correct order of loading cache and database

---
M web-jspack/org.openbravo.core2/src/authentication/loginInitActions.js
---
(0144810)
hgbot   
2022-12-19 08:57   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/937 [^]