Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0057963 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
backport | [POS2] Core | critical | have not tried | 2024-09-05 11:56 | 2025-02-23 18:44 | |||
Reporter | AugustoMauch | View Status | public | |||||
Assigned To | AugustoMauch | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 25Q1 | |||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | 25Q1 | |||
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 | 0057963: Management of inconsistent application state should be properly addressed in core2 applications | |||||||
Description | From time to time, the application state gets inconsistent, apparently not reflecting the current state of the application but a previous one. We looking for those inconsistencies on a case-to-case basis, and introducing mitigation measures on a case-to-case basis as well. This mechanism should be improved, so that if any inconsistency is found, all the application state modules should be re-initialized properly. | |||||||
Steps To Reproduce | - | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
|||||||||||||||
|
![]() |
|
(0176032) hgbot (developer) 2025-02-23 17:56 |
Merge Request created: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/1788 [^] |
(0176033) hgbot (developer) 2025-02-23 17:58 |
Merge Request created: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/835 [^] |
(0176034) hgbot (developer) 2025-02-23 18:00 |
Merge Request created: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1932 [^] |
(0176035) hgbot (developer) 2025-02-23 18:02 |
Merge Request created: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/3544 [^] |
(0176038) hgbot (developer) 2025-02-23 18:44 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.core2 [^] Changeset: 92e0ba54f465b627a1acb80b211bbdb682be2bec Author: Augusto Mauch <a.mauch@orisha.com> Date: 23-02-2025 18:18:56 URL: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.core2/-/commit/92e0ba54f465b627a1acb80b211bbdb682be2bec [^] Fixes ISSUE-57963: Global mitigation of state related problems On each login, the local state is checked, and if it is determined that the state is not valid, it will be reset. This code references non-core2 concepts (Ticket, Cashup). It was done intentionally, this code should be temporary and be removed once we find out the root cause of the back-to-the-past state problems. Instead of implementing some infra to be able to add the relevant portion of the state to the request payload, it is hardcoded for now [stateMitigation] Adds missing adminMode when checking the state validity [stateMitigation] Properly fail when in offline mode the stateValidity request [stateMitigation] Use OB.App.reload api instead of manual location reload Related to ISSUE-56377: Fixes test Fixes ISSUE-58004: Login blocked because of an error related to an inconsistent state The checkStateValidity function was not taking into account empty ticket object or a missing cashup id. --- M src-db/database/sourcedata/AD_MESSAGE.xml M web-jspack/org.openbravo.core2/src/authentication/loginInitActions.js --- |
(0176039) hgbot (developer) 2025-02-23 18:44 |
Merge request merged: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/1788 [^] |
(0176041) hgbot (developer) 2025-02-23 18:44 |
Repository: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.mobile.core [^] Changeset: 6e14cb2298058044695baeaf551c44846c2481cb Author: Augusto Mauch <a.mauch@orisha.com> Date: 23-02-2025 17:57:47 URL: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/6e14cb2298058044695baeaf551c44846c2481cb [^] Related to ISSUE-57963: Applies global mitigation to state problems The specific instances of ApplicationStateCheck will be provided in the functional modules (i.e. org.openbravo.retail.posterminal). The ApplicationStateChecker endpoint will be invoked from mobile.core and core2 applications, to check if the current state is not, with the purpose of resetting the state in case it is not valid [stateMitigation] Adds missing javadoc [stateMitigation] Adds missing adminMode when checking the state validity [stateMitigation] Extend reload API function to allow skipping state flushing [stateMitigation] Updates copyright year --- A src/org/openbravo/mobile/core/process/ApplicationStateCheck.java A src/org/openbravo/mobile/core/process/ApplicationStateChecker.java M src-db/database/sourcedata/OBMOBC_SERVICES.xml M web/org.openbravo.mobile.core/app/model/application-state/StatePersistence.js --- |
(0176042) hgbot (developer) 2025-02-23 18:44 |
Merge request merged: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/835 [^] |
(0176043) hgbot (developer) 2025-02-23 18:44 |
Repository: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.retail.posterminal [^] Changeset: fa713f84bf159f54e6030aeebe347c037a7badef Author: Augusto Mauch <a.mauch@orisha.com> Date: 23-02-2025 17:59:53 URL: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/fa713f84bf159f54e6030aeebe347c037a7badef [^] Related to ISSUE-57963: Applies global mitigation to state problems An application state will be determined as invalid if: - The Ticket it references is already processed in the backend - The Cashup it references is already processed in the backend, or it is not processed but one in the application is outdated (grossSales and grossReturns are checked to determine if the cashup is outdated [stateMitigation] Simplifies cashup check by using the totalCompleteTickets column instead of the sold/returned amounts [stateMitigation] Adds log for state checkers [stateMitigation] Updates copyright year --- A src/org/openbravo/retail/posterminal/statechecker/CashupStateChecker.java A src/org/openbravo/retail/posterminal/statechecker/TicketStateChecker.java --- |
(0176044) hgbot (developer) 2025-02-23 18:44 |
Merge request merged: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1932 [^] |
(0176045) hgbot (developer) 2025-02-23 18:44 |
Repository: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.pos2 [^] Changeset: 0bfaea4dc6fab137f0b809091005c2711f3d2144 Author: André Montenegro <a.montenegro@orisha.com> Date: 23-02-2025 18:01:37 URL: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.pos2/-/commit/0bfaea4dc6fab137f0b809091005c2711f3d2144 [^] Related to ISSUE-57963: created intercept in logInProcess to avoid backOffice checks for ticket and cashup ID The state persistence check cannot be done when running CI, because in the cypress tests there is a mechanism that reuses previous states in order to skip having to login very often --- M web-jspack/org.openbravo.pos2/src-test/cypress/support/logIn.js --- |
(0176046) hgbot (developer) 2025-02-23 18:44 |
Merge request merged: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/3544 [^] |
![]() |
|||
Date Modified | Username | Field | Change |
2025-02-12 23:25 | AugustoMauch | Type | feature request => backport |
2025-02-12 23:25 | AugustoMauch | Target Version | => 25Q1 |
2025-02-23 17:56 | hgbot | Note Added: 0176032 | |
2025-02-23 17:58 | hgbot | Note Added: 0176033 | |
2025-02-23 18:00 | hgbot | Note Added: 0176034 | |
2025-02-23 18:02 | hgbot | Note Added: 0176035 | |
2025-02-23 18:20 | AugustoMauch | Relationship added | has duplicate 0058005 |
2025-02-23 18:44 | hgbot | Resolution | open => fixed |
2025-02-23 18:44 | hgbot | Status | scheduled => closed |
2025-02-23 18:44 | hgbot | Fixed in Version | => 25Q1 |
2025-02-23 18:44 | hgbot | Note Added: 0176038 | |
2025-02-23 18:44 | hgbot | Note Added: 0176039 | |
2025-02-23 18:44 | hgbot | Note Added: 0176041 | |
2025-02-23 18:44 | hgbot | Note Added: 0176042 | |
2025-02-23 18:44 | hgbot | Note Added: 0176043 | |
2025-02-23 18:44 | hgbot | Note Added: 0176044 | |
2025-02-23 18:44 | hgbot | Note Added: 0176045 | |
2025-02-23 18:44 | hgbot | Note Added: 0176046 |
Copyright © 2000 - 2009 MantisBT Group |