Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0051822 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
backport | [POS2] POS | major | always | 2023-01-03 15:31 | 2023-03-21 17:08 | |||
Reporter | javierRodriguez | View Status | public | |||||
Assigned To | meriem_azaf | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 23Q1.1 | |||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | 23Q1.1 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | approved | |||||||
Review Assigned To | ||||||||
OBNetwork customer | No | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0051822: If localStorage does not have latest safebox information, updated it with the information stored in the backend | |||||||
Description | Sometimes, the information about currently attached safebox is not up to date on localStorage (root cause of this will be addressed in another issue). When that happens, we could start the POS: - assuming that a safebox is attached, when it has already been removed, or - assuming that there is no safebox attached, when one is currently in the POS We are going to assume that the backend will always have the most up to date information, so when login in we will: - make a request to the backend to check if the terminal has currently a safebox attached - use that information to update the localStorage | |||||||
Steps To Reproduce | We can forcefully reproduce the problem like this: - Configure the terminal to use safeboxes A) Safebox attached, but localStorage does not have the latest information and thinks it is not attached - Login, select a safebox - Logout without doing cashup, safebox will stay in the terminal - Forcefully remove the safebox by executing: OB.UTIL.localStorage.removeItem('currentSafeBox'); B) Safebox not attached, but localStorage does not have the latest information and thinks it is attached - Login, select a safebox - Do a cashup. Check that the safebox has been removed from localStorage by executing OB.UTIL.localStorage.getItem('currentSafeBox'); and checking that it returns null/undefined - Forcefully update localStorage by executing OB.UTIL.localStorage.removeItem('currentSafeBox'); - Logout without doing cashup, safebox will stay in the terminal - Forcefully remove the safebox by executing: OB.UTIL.localStorage.setItem('currentSafeBox','{"safeBoxName":"Vall Blanca Safe Box 03","safeBoxId":"86E4C11FC0CF4A4782E6985AADBD0068","safeBoxCountOnRemove":false,"safeBoxSearchKey":"VBSB03","paymentMethods":[{"allowNotToMove":true,"safeBoxPaymentMethodId":"0A3E31C66F424C09B7BD93624B7439C2","amount":200,"keepFixedAmount":true,"countCash":true,"automateMovementToOtherAccount":true,"allowMoveEverything":true,"countDifferenceLimit":0,"paymentMethodId":"45A202BF44884F05B8A1BF741E2063B6","allowVariableAmount":true,"countPerAmount":false,"currency":"102","isCash":true,"financialAccountId":"16CAAB578E8246E0829DFF987103A3F8","safeBoxCounting":{"depositBalance":0,"paymentBalance":0,"initialBalance":0}}],"id":"86E4C11FC0CF4A4782E6985AADBD0068"}'); | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
||||||||
|
![]() |
|
(0147720) hgbot (developer) 2023-03-20 17:42 |
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1606 [^] |
(0147775) hgbot (developer) 2023-03-21 17:07 |
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1110 [^] |
(0147777) hgbot (developer) 2023-03-21 17:08 |
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1110 [^] |
(0147778) hgbot (developer) 2023-03-21 17:08 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^] Changeset: d0a63850a2cdda2d0e44fe8ed20ccbcbe78dfd79 Author: Meriem Azaf <meriem.azaf@openbravo.com> Date: 21-03-2023 15:20:59 URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/d0a63850a2cdda2d0e44fe8ed20ccbcbe78dfd79 [^] Fixes ISSUE-51822: Not matching safeBox information between the localStorage and the backend Sometimes, the information about currently attached safebox is not up to date on localStorage. When this has happened, the mechanism to mitigate the same problem but applied to the cashup information is triggered. In this issue, if the cashup mitigation was triggered, a request will be done to the backend to find out if the backend thinks there is a safebox attached to the terminal. If there is not, but there seems to be a safebox attached on the local data, we will assume the local data is outdated and we will remove the information about the currently attached safebox stored locally. --- A src/org/openbravo/pos2/master/SafeBox.java M src-db/database/sourcedata/OBMOBC_SERVICES.xml M web-jspack/org.openbravo.pos2/src/authentication/loginInitActions.js --- |
(0147779) hgbot (developer) 2023-03-21 17:08 |
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1606 [^] |
![]() |
|||
Date Modified | Username | Field | Change |
2023-03-09 12:52 | guilleaer | Type | feature request => backport |
2023-03-09 12:52 | guilleaer | Target Version | => 23Q1.1 |
2023-03-20 17:42 | hgbot | Merge Request Status | => open |
2023-03-20 17:42 | hgbot | Note Added: 0147720 | |
2023-03-21 09:30 | meriem_azaf | Assigned To | AugustoMauch => meriem_azaf |
2023-03-21 09:34 | meriem_azaf | Summary | When state perisitance problem appears -> Mitigate safe box selection => If localStorage does not have latest safebox information, updated it with the information stored in the backend |
2023-03-21 09:34 | meriem_azaf | Description Updated | View Revisions |
2023-03-21 09:34 | meriem_azaf | Steps to Reproduce Updated | View Revisions |
2023-03-21 17:07 | hgbot | Note Added: 0147775 | |
2023-03-21 17:07 | hgbot | Merge Request Status | open => approved |
2023-03-21 17:08 | hgbot | Note Added: 0147777 | |
2023-03-21 17:08 | hgbot | Resolution | open => fixed |
2023-03-21 17:08 | hgbot | Status | scheduled => closed |
2023-03-21 17:08 | hgbot | Fixed in Version | => 23Q1.1 |
2023-03-21 17:08 | hgbot | Note Added: 0147778 | |
2023-03-21 17:08 | hgbot | Note Added: 0147779 |
Copyright © 2000 - 2009 MantisBT Group |