Openbravo Issue Tracking System - POS2
View Issue Details
0050731POS2Corepublic2022-11-03 12:382022-11-08 09:42
cberner 
cberner 
normalmajorhave not tried
closedfixed 
5
 
22Q3.322Q3.3 
No
0050731: 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 => 22Q3.3
2022-11-08 00:02hgbotNote Added: 0143192
2022-11-08 00:11hgbotNote Added: 0143195
2022-11-08 09:42hgbotNote Added: 0143215
2022-11-08 09:42hgbotNote Added: 0143216
2022-11-08 09:42hgbotResolutionopen => fixed
2022-11-08 09:42hgbotStatusscheduled => closed
2022-11-08 09:42hgbotFixed in Version => 22Q3.3
2022-11-08 09:42hgbotNote Added: 0143219
2022-11-08 09:42hgbotNote Added: 0143220

Notes
(0143192)
hgbot   
2022-11-08 00:02   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/895 [^]
(0143195)
hgbot   
2022-11-08 00:11   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/433 [^]
(0143215)
hgbot   
2022-11-08 09:42   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: e75b27bf5656787160ce0c572349dfea905d7076
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 08-11-2022 08:40:31
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/e75b27bf5656787160ce0c572349dfea905d7076 [^]

Related to ISSUE-50731: 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
---
(0143216)
hgbot   
2022-11-08 09:42   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/433 [^]
(0143219)
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: 01a0fafe8ff6b081d34d045f9cef9445383a13b2
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 08-11-2022 08:40:37
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/01a0fafe8ff6b081d34d045f9cef9445383a13b2 [^]

Fixes ISSUE-50731: 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
---
(0143220)
hgbot   
2022-11-08 09:42   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/895 [^]