Openbravo Issue Tracking System - POS2
View Issue Details
0050730POS2Corepublic2022-11-03 12:382022-11-08 09:42
cberner 
cberner 
normalmajorhave not tried
closedfixed 
5
 
22Q4.122Q4 
No
0050730: Terminal log is lost on logout if state is removed before next login
Terminal log is saved when we logout from the application in the state. 0000145:0000030 seconds later, it is moved from state to indexedDB, where it is persisted. If this doesn't happen, because we close the application after logout, anything that is in the state, is susceptible to being removed and not persisted.

We should not lose this terminal log, by forcing save into indexedb just before logout.
1. Login WebPOS and do a cashup.
2. Refresh the application while in login screen, and then clear the current state -> OB.App.State.persistence.stateStorePersistor.purge() in devtools console
3. Try to login, check that terminal log is lost, by going to backend and looking at the terminal log window
No tags attached.
blocks defect 0050720 closed cberner Terminal log is lost on logout if state is removed before next login 
Issue History
2022-11-04 10:53guilleaerTypedefect => backport
2022-11-04 10:53guilleaerTarget Version => 22Q4.1
2022-11-08 00:04hgbotNote Added: 0143193
2022-11-08 00:10hgbotNote Added: 0143194
2022-11-08 09:42hgbotNote Added: 0143217
2022-11-08 09:42hgbotNote Added: 0143218
2022-11-08 09:42hgbotNote Added: 0143221
2022-11-08 09:42hgbotResolutionopen => fixed
2022-11-08 09:42hgbotStatusscheduled => closed
2022-11-08 09:42hgbotFixed in Version => 22Q4
2022-11-08 09:42hgbotNote Added: 0143222

Notes
(0143193)
hgbot   
2022-11-08 00:04   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/896 [^]
(0143194)
hgbot   
2022-11-08 00:10   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/432 [^]
(0143217)
hgbot   
2022-11-08 09:42   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: 17bb442f71444fb5108c0c1603e7877574163c90
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 08-11-2022 00:09:58
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/17bb442f71444fb5108c0c1603e7877574163c90 [^]

Related to ISSUE-50730: Extract terminalLogGenerateMessage state action to utility action

The implementation was extracted to a TerminalLog utility action, so it
can be used in pre and posthooks.

---
M web/org.openbravo.mobile.core/app/model/business-object/terminal-log/actions/TerminalLogGenerateMessage.js
---
(0143218)
hgbot   
2022-11-08 09:42   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/432 [^]
(0143221)
hgbot   
2022-11-08 09:42   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/896 [^]
(0143222)
hgbot   
2022-11-08 09:42   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^]
Changeset: d35057877a0476df73bbaf80a190fea385a3e369
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 08-11-2022 09:33:38
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/d35057877a0476df73bbaf80a190fea385a3e369 [^]

Fixes ISSUE-50730: Terminal log is lost on logout if state is removed before next login

To fix this, we force a synchronization of the data just before logout,
this already happens regularly every 30 seconds, so should have little
performance impact.

---
M web-jspack/org.openbravo.core2/src/model/session/Session.js
M web-jspack/org.openbravo.core2/src/model/session/__test__/Logout.test.js
M web-jspack/org.openbravo.core2/src/model/session/user-actions/Logout.js
---