Openbravo Issue Tracking System - POS2
View Issue Details
0052315POS2Corepublic2023-05-03 10:422023-05-03 17:07
AugustoMauch 
AugustoMauch 
normalmajorhave not tried
closedfixed 
5
 
23Q2.123Q2 
No
0052315: 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-05-03 10:42AugustoMauchTypedefect => backport
2023-05-03 10:42AugustoMauchTarget Version => 23Q2.1
2023-05-03 16:17hgbotNote Added: 0149225
2023-05-03 16:18hgbotResolutionopen => fixed
2023-05-03 16:18hgbotStatusscheduled => closed
2023-05-03 16:18hgbotFixed in Version => RR23Q2
2023-05-03 16:18hgbotNote Added: 0149226
2023-05-03 16:18hgbotNote Added: 0149227
2023-05-03 17:06hgbotNote Added: 0149244
2023-05-03 17:07hgbotFixed in VersionRR23Q2 => 23Q2
2023-05-03 17:07hgbotNote Added: 0149245
2023-05-03 17:07hgbotNote Added: 0149246

Notes
(0149225)
hgbot   
2023-05-03 16:17   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/510 [^]
(0149226)
hgbot   
2023-05-03 16:18   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/510 [^]
(0149227)
hgbot   
2023-05-03 16:18   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: d4fc9fe8b18de69cc074849b7daf0eaa873cc1de
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 03-05-2023 16:17:14
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/d4fc9fe8b18de69cc074849b7daf0eaa873cc1de [^]

Fixes ISSUE-52315: 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
---
(0149244)
hgbot   
2023-05-03 17:06   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/1078 [^]
(0149245)
hgbot   
2023-05-03 17:07   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^]
Changeset: 163f213a24c951090b4707e240d04d3156896be3
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 03-05-2023 17:01:33
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/163f213a24c951090b4707e240d04d3156896be3 [^]

Fixes ISSUE-52315: 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
---
(0149246)
hgbot   
2023-05-03 17:07   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/1078 [^]