Openbravo Issue Tracking System - POS2
View Issue Details
0052092POS2Corepublic2023-04-11 11:372023-06-07 15:36
AugustoMauch 
gonzalo_fernandez 
normalmajorhave not tried
closedfixed 
5
 
 
No
0052092: Store a single copy of the Terminal in IndexedDB
The way we currently store the Terminal information to be consumed when the POS is offline is not proper. We are storing a copy of the Terminal info per user, which has two drawbacks:
- space is wasted, as the terminal info should be agnostic from the user currently logged in
- cached Terminal information will get outdated, because when the terminal info is refreshed in the session of a user, that copy of the terminal info will be updated, but the copies stored for other users will become stale.

To address this, we are going to store the terminal information on its own IndexedDB model, outside the User model.

Jira: https://openbravo.atlassian.net/browse/RM-5917 [^]
-
No tags attached.
related to defect 0052052 closed AugustoMauch Reduce the number of times the state is persisted on disk 
has duplicate design defect 0049249 closed Triage Platform Base Terminalinfo should be separated from user info in indexeddb 
causes defect 0052894 closed AugustoMauch Cache refresh forced after updating environment 
causes defect 0052907 closed meriem_azaf Login offline is not working 
Issue History
2023-04-11 11:37AugustoMauchNew Issue
2023-04-11 11:37AugustoMauchAssigned To => gonzalo_fernandez
2023-04-11 11:37AugustoMauchTriggers an Emergency Pack => No
2023-04-17 15:31hgbotNote Added: 0148488
2023-04-17 15:32hgbotNote Added: 0148489
2023-04-17 15:33hgbotNote Added: 0148490
2023-04-21 14:53hgbotNote Added: 0148747
2023-04-24 11:34hgbotNote Added: 0148781
2023-04-25 15:40AugustoMauchStatusnew => scheduled
2023-04-27 15:26hgbotNote Added: 0149020
2023-05-09 13:26hgbotNote Added: 0149491
2023-05-11 14:21rafarodaRelationship addedrelated to 0052052
2023-06-05 09:23AugustoMauchNote Deleted: 0148747
2023-06-05 09:23AugustoMauchNote Deleted: 0148781
2023-06-05 11:12hgbotNote Added: 0150716
2023-06-05 11:12hgbotNote Added: 0150717
2023-06-05 11:12hgbotNote Added: 0150718
2023-06-05 11:12hgbotNote Added: 0150719
2023-06-05 11:12hgbotNote Added: 0150720
2023-06-05 11:12hgbotNote Added: 0150721
2023-06-05 11:12hgbotResolutionopen => fixed
2023-06-05 11:12hgbotStatusscheduled => closed
2023-06-05 11:12hgbotFixed in Version => 23Q3
2023-06-05 11:12hgbotNote Added: 0150722
2023-06-05 11:12hgbotNote Added: 0150723
2023-06-05 11:12hgbotFixed in Version23Q3 => RR23Q3
2023-06-05 11:12hgbotNote Added: 0150724
2023-06-05 11:12hgbotNote Added: 0150725
2023-06-05 11:12hgbotNote Added: 0150726
2023-06-05 11:13AugustoMauchFixed in VersionRR23Q3 =>
2023-06-05 11:13AugustoMauchDescription Updatedbug_revision_view_page.php?rev_id=26209#r26209
2023-06-07 11:10hgbotNote Added: 0150857
2023-06-07 15:36hgbotNote Added: 0150896
2023-06-07 15:36hgbotNote Added: 0150897
2023-06-30 08:56AugustoMauchRelationship addedcauses 0052894
2023-07-20 10:26meriem_azafRelationship addedcauses 0052907
2024-01-02 16:29cbernerRelationship addedhas duplicate 0049249

Notes
(0148488)
hgbot   
2023-04-17 15:31   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/1049 [^]
(0148489)
hgbot   
2023-04-17 15:32   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/498 [^]
(0148490)
hgbot   
2023-04-17 15:33   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1141 [^]
(0149020)
hgbot   
2023-04-27 15:26   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1736 [^]
(0149491)
hgbot   
2023-05-09 13:26   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.selfcheckout/-/merge_requests/41 [^]
(0150716)
hgbot   
2023-06-05 11:12   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.selfcheckout [^]
Changeset: e3f6073bb6dce854ae84186d971b477d14bbe227
Author: Gonzalo Fernández García <gonzalo.fernandez@openbravo.com>
Date: 31-05-2023 12:07:46
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.selfcheckout/-/commit/e3f6073bb6dce854ae84186d971b477d14bbe227 [^]

Related to ISSUE-52092: Removes unwanted terminalinfo persistence from selfcheckout approval flow

---
M web/org.openbravo.retail.selfcheckout/source/panels/loginPOSPanel.js
---
(0150717)
hgbot   
2023-06-05 11:12   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.selfcheckout/-/merge_requests/41 [^]
(0150718)
hgbot   
2023-06-05 11:12   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: ee09f381b564690bcfb52403a043659531d138cd
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 05-06-2023 07:25:42
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/ee09f381b564690bcfb52403a043659531d138cd [^]

Related to ISSUE-52092: Computes user payments from all payments + preferences

The "payments" terminal property has been renamed to "allPayments", and now it returns all the payments available in a terminal
instead of only those available to the user. Then in login-model we compute the "payments" terminal property by iterating on
"allPayments" and discarding those that are not available to the current user

---
A src/org/openbravo/retail/posterminal/login/OBPOsLoginDataProvider.java
M src/org/openbravo/retail/posterminal/term/Payments.java
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
---
(0150719)
hgbot   
2023-06-05 11:12   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1141 [^]
(0150720)
hgbot   
2023-06-05 11:12   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: ef56ec499cc5b9fb85fd560aa71b442c152a8bf0
Author: Gonzalo Fernández García <gonzalo.fernandez@openbravo.com>
Date: 05-06-2023 07:25:35
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/ef56ec499cc5b9fb85fd560aa71b442c152a8bf0 [^]

Related to ISSUE-52092 Updates the properties that are checked to decide whether a masterdata refresh is required or not logging in

The allPayments terminal property contains all the payment methods defined for the terminal, in this commit the payments property
is stored in the terminal taking into account if the current user has access to each payment method

---
M web-jspack/org.openbravo.pos2/src/authentication/loginInitActions.js
---
(0150721)
hgbot   
2023-06-05 11:12   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1736 [^]
(0150722)
hgbot   
2023-06-05 11:12   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^]
Changeset: be2b7bb397472c32d16993c52cddad94d1ce80f2
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 05-06-2023 11:10:03
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/be2b7bb397472c32d16993c52cddad94d1ce80f2 [^]

Fixes ISSUE-52092: Merges fix/52092-user-terminal-data branch

---
M src/org/openbravo/core2/login/Core2LoginUtilsServlet.java
M src/org/openbravo/core2/login/GrantedUserActionsProvider.java
M web-jspack/org.openbravo.core2/src/core/authentication/InitializeAppData.js
M web-jspack/org.openbravo.core2/src/core/authentication/LoginProcess.js
M web-jspack/org.openbravo.core2/src/core/authentication/RestoreSession.js
M web-jspack/org.openbravo.core2/src/core/authentication/__test__/InitializeAppData.test.js
M web-jspack/org.openbravo.core2/src/core/authentication/__test__/LoginProcess.test.js
M web-jspack/org.openbravo.core2/src/core/authentication/__test__/RestoreSession.test.js
M web-jspack/org.openbravo.core2/src/core/terminal/TerminalDataMasterdataHooks.js
M web-jspack/org.openbravo.core2/src/core/terminal/__test__/TerminalDataMasterdataHooks.test.js
---
(0150723)
hgbot   
2023-06-05 11:12   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/1049 [^]
(0150724)
hgbot   
2023-06-05 11:12   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: e9e50cf868037bc8e43dc9ae7fb5dca0ca5eaed5
Author: Gonzalo Fernández García <gonzalo.fernandez@openbravo.com>
Date: 05-06-2023 10:44:09
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/e9e50cf868037bc8e43dc9ae7fb5dca0ca5eaed5 [^]

[terminal-info] Fixes ISSUE-52092: Fixes terminal data storage in IndexedDB

Previously, terminal data was stored in the User model under the property named terminalinfo. Now, we count with a separated Terminal model where this information will be stored. Nevertheless, the terminal properties that are related to the user have been moved to the User model as independent properties.

---
A web/org.openbravo.mobile.core/app/model/login/TerminalModel.js
M src/org/openbravo/mobile/core/MobileCoreComponentProvider.java
M web/org.openbravo.mobile.core/app/model/login/OfflineSession.js
M web/org.openbravo.mobile.core/app/model/login/OfflineSessionController.js
---
(0150725)
hgbot   
2023-06-05 11:12   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/498 [^]
(0150726)
hgbot   
2023-06-05 11:12   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: 271308ae405e2c0ac316fcbba143022670219200
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 05-06-2023 11:11:18
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/271308ae405e2c0ac316fcbba143022670219200 [^]

Fixes ISSUE-52092: Merges branch fix/52092-user-terminal-data

---
A web/org.openbravo.mobile.core/app/model/login/TerminalModel.js
M src/org/openbravo/mobile/core/MobileCoreComponentProvider.java
M src/org/openbravo/mobile/core/login/MobileCoreLoginUtilsServlet.java
M web/org.openbravo.mobile.core/app/model/login/OfflineSession.js
M web/org.openbravo.mobile.core/app/model/login/OfflineSessionController.js
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
---
(0150857)
hgbot   
2023-06-07 11:10   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/548 [^]
(0150896)
hgbot   
2023-06-07 15:36   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/548 [^]
(0150897)
hgbot   
2023-06-07 15:36   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: f4021087569e2ac954e77ce6ea657a91920ed9b4
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 07-06-2023 13:36:06
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/f4021087569e2ac954e77ce6ea657a91920ed9b4 [^]

Related to ISSUE-52092: Makes sure terminal model always have an ID

---
M web/org.openbravo.mobile.core/app/model/login/OfflineSession.js
---