Openbravo Issue Tracking System - POS2
View Issue Details
0052765POS2Corepublic2023-06-16 08:432023-06-16 09:02
AugustoMauch 
AugustoMauch 
normalminorhave not tried
closedfixed 
5
 
22Q4.2 
No
0052765: Popup should not be displayed when the application is refreshed programatically
When the user tries to refresh the browser manually, a popup is displayed to ensure the state is persisted before refreshing the browser.

But that popup is not needed when the application is refreshed programatically, we could automatically force the persistence of the state as part of that programatical refresh.
- Open POS2
- Log in
- In the back office, do a change in a terminal property (i.e. change the default business partner and address)
- In POS2, refresh the master data. A refresh will be tried because there were changes in the terminal, and the intrusive popup will be displayed that will allow the user to skip the refresh resulting in inconsistencies
No tags attached.
blocks defect 0052314 closed AugustoMauch Popup should not be displayed when the application is refreshed programatically 
Issue History
2023-06-16 08:43AugustoMauchNew Issue
2023-06-16 08:43AugustoMauchAssigned To => AugustoMauch
2023-06-16 08:43AugustoMauchTriggers an Emergency Pack => No
2023-06-16 08:43AugustoMauchIssue generated from0052764
2023-06-16 09:01hgbotNote Added: 0151259
2023-06-16 09:02hgbotNote Added: 0151260
2023-06-16 09:02hgbotResolutionopen => fixed
2023-06-16 09:02hgbotStatusnew => closed
2023-06-16 09:02hgbotFixed in Version => 22Q4.3
2023-06-16 09:02hgbotNote Added: 0151261
2023-06-16 09:02hgbotNote Added: 0151262
2023-06-16 09:02hgbotNote Added: 0151263
2023-06-16 09:02hgbotFixed in Version22Q4.3 => RR22Q4.3
2023-06-16 09:02hgbotNote Added: 0151264
2023-06-21 09:26AugustoMauchRelationship addedblocks 0052314

Notes
(0151259)
hgbot   
2023-06-16 09:01   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/1138 [^]
(0151260)
hgbot   
2023-06-16 09:02   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/554 [^]
(0151261)
hgbot   
2023-06-16 09:02   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^]
Changeset: 5c722e7cb45328279484ab137d0713f8741f010a
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 16-06-2023 09:00:29
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/5c722e7cb45328279484ab137d0713f8741f010a [^]

Fixes ISSUE-52765: Uses OB.App.reload instead of window.location.reload

The OB.App.reload function will ensure that the state is persisted before reload and also that the
popup that is open when the user refreshes manually to have time to persist the state is not rendered

---
M web-jspack/org.openbravo.core2/src/components/AppBar/ProfileSelector/ProfileSelector.jsx
M web-jspack/org.openbravo.core2/src/components/AppBar/ProfileSelector/__test__/ProfileSelector.test.jsx
M web-jspack/org.openbravo.core2/src/components/ErrorFallback/ErrorFallback.jsx
M web-jspack/org.openbravo.core2/src/core/authentication/LoginProcess.js
M web-jspack/org.openbravo.core2/src/core/authentication/__test__/LoginProcess.test.js
M web-jspack/org.openbravo.core2/src/core/masterdata/MasterdataRefresh.js
M web-jspack/org.openbravo.core2/src/model/user-interface/user-actions/RefreshMasterdata.js
M web-jspack/org.openbravo.core2/src/registerServiceWorker.js
M web-jspack/org.openbravo.core2/src/serviceWorkerRegistration.js
---
(0151262)
hgbot   
2023-06-16 09:02   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/1138 [^]
(0151263)
hgbot   
2023-06-16 09:02   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/554 [^]
(0151264)
hgbot   
2023-06-16 09:02   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: 9fe57a106ab24959b9c2db7a99395327cde4f7a0
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 16-06-2023 09:01:29
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/9fe57a106ab24959b9c2db7a99395327cde4f7a0 [^]

Fixes ISSUE-52765: Adds a function to reload the properly reload the application programatically

The new function OB.App.reload will ensure the state is flushed before the reload, and will also unregister the
onbeforeunload listener to prevent the reload popup from appearing

---
M web/org.openbravo.mobile.core/app/model/application-state/StatePersistence.js
---