Openbravo Issue Tracking System - POS2
View Issue Details
0048274POS2Corepublic2021-12-17 13:022022-12-12 16:00
caristu 
cberner 
highminorhave not tried
closedfixed 
5
 
23Q1 
No
0048274: userActionInProgress state property incorrectly set to null in some cases
If we have a UIAction "A" which invokes a different UIAction "B" (for example in a post hook) then the userActionInProgress state property is incorrectly set to null after "B" finishes.

This is not correct userActionInProgress should be "A" when "B" finishes.
1- Create a new ticket
2- Add a couple of products
3- Select a line
4- Unselect the previously selected line. Check the state changes, the following sequence of changes has been applied to the userActionInProgress property
  > null --> OBPOS2_SelectLine (OK)
  > OBPOS2_SelectLine --> OBPOS2_SetMultiLineSelection (OK)
  > OBPOS2_SetMultiLineSelection --> null (WRONG): instead of null it should be restored to OBPOS2_SelectLine and once OBPOS2_SelectLine finishes then set back to null again
The proposed fix for this issue was implemented in 0048144 but then reverted in 0048269, because when we login in POS2, the are two user actions ('OBPOS2_SelectKeymapCategory', 'OBC2_setKeymapPages') whose execution is being overlapped causing the stack not being cleared properly, and therefore the UserAction Scrim is always shown, blocking every user operation.

The final fix should also take into account that scenario to avoid breaking the POS
No tags attached.
related to defect 0048144 closed caristu userActionInProgress state property incorrectly set to null in some cases 
related to defect 0048269 closed caristu POS2 is stuck in loading status 
png 1.png (8,999) 2021-12-17 13:05
https://issues.openbravo.com/file_download.php?file_id=16443&type=bug
png

png 2.png (12,163) 2021-12-17 13:05
https://issues.openbravo.com/file_download.php?file_id=16444&type=bug
png

png 3.png (10,109) 2021-12-17 13:05
https://issues.openbravo.com/file_download.php?file_id=16445&type=bug
png
Issue History
2021-12-17 13:02caristuNew Issue
2021-12-17 13:02caristuAssigned To => caristu
2021-12-17 13:02caristuTriggers an Emergency Pack => No
2021-12-17 13:02caristuIssue generated from0048144
2021-12-17 13:02caristuRelationship addedrelated to 0048144
2021-12-17 13:02caristuStatusnew => acknowledged
2021-12-17 13:03caristuRelationship addedrelated to 0048269
2021-12-17 13:05caristuFile Added: 1.png
2021-12-17 13:05caristuFile Added: 2.png
2021-12-17 13:05caristuFile Added: 3.png
2021-12-21 13:51caristuProposed Solution updated
2021-12-23 12:55caristuAssigned Tocaristu => platform
2021-12-23 17:41AugustoMauchAssigned Toplatform => Triage Platform Base
2022-11-25 16:18hgbotNote Added: 0144168
2022-11-25 16:20hgbotNote Added: 0144169
2022-11-25 16:35cbernerAssigned ToTriage Platform Base => cberner
2022-12-12 16:00hgbotResolutionopen => fixed
2022-12-12 16:00hgbotStatusacknowledged => closed
2022-12-12 16:00hgbotNote Added: 0144537
2022-12-12 16:00hgbotFixed in Version => 23Q1
2022-12-12 16:00hgbotNote Added: 0144538
2022-12-12 16:00hgbotNote Added: 0144539
2022-12-12 16:00hgbotNote Added: 0144540

Notes
(0144168)
hgbot   
2022-11-25 16:18   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/930 [^]
(0144169)
hgbot   
2022-11-25 16:20   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1389 [^]
(0144537)
hgbot   
2022-12-12 16:00   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/930 [^]
(0144538)
hgbot   
2022-12-12 16:00   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^]
Changeset: ea59cfd99f30cbc2c03aeafb1475e94cc32fba31
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 12-12-2022 15:00:20
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/ea59cfd99f30cbc2c03aeafb1475e94cc32fba31 [^]

Fixes ISSUE-48274: Keep track of all in progress user actions instead of only the last one

Changes how in progress user action is being tracked. Previously it was a string, and now it is a stack that keeps all the in progress user actions, and not only the last one. By doing so, we're able to track parent user actions that call child user actions, without losing them when the child user action finishes.

---
A web-jspack/org.openbravo.core2/src/core/user-action/__test__/UseUserActionInProgress.test.jsx
A web-jspack/org.openbravo.core2/src/core/user-action/useUserActionInProgress.js
A web-jspack/org.openbravo.core2/src/model/user-interface/__test__/UserActionInProgressStack.test.js
A web-jspack/org.openbravo.core2/src/model/user-interface/actions/UserActionInProgressStack.js
M web-jspack/org.openbravo.core2/src/components/BaseDialog/__test__/BaseDialog.test.jsx
M web-jspack/org.openbravo.core2/src/components/BasePopover/__test__/BasePopover.test.jsx
M web-jspack/org.openbravo.core2/src/components/BasePopover/stories/BasePopover.stories.jsx
M web-jspack/org.openbravo.core2/src/components/Scrim/UserActionScrim/UserActionScrim.jsx
M web-jspack/org.openbravo.core2/src/components/Scrim/UserActionScrim/__test__/UserActionScrim.test.jsx
M web-jspack/org.openbravo.core2/src/components/Scrim/UserActionScrim/stories/UserActionScrim.stories.jsx
M web-jspack/org.openbravo.core2/src/core/user-action/UserAction.js
M web-jspack/org.openbravo.core2/src/hooks/useLockableStackOrder/__test__/useLockableStackOrder.test.jsx
M web-jspack/org.openbravo.core2/src/hooks/useLockableStackOrder/useLockableStackOrder.js
M web-jspack/org.openbravo.core2/src/model/user-interface/UI.js
R web-jspack/org.openbravo.core2/src/model/user-interface/actions/SetUserActionInProgress.js
---
(0144539)
hgbot   
2022-12-12 16:00   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 186cbec8965158794a71d78fe13a1bbdfe042f7d
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 12-12-2022 15:55:44
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/186cbec8965158794a71d78fe13a1bbdfe042f7d [^]

Related to ISSUE-48274: userActionInProgress state property incorrectly set to null in some cases

Fixes some tests due to the changes on how userActionInProgress works
now. Previously it was a single string and now it is an array of
actions.

---
M web-jspack/org.openbravo.pos2/src/model/user-interface/__test__/SelectCurrentSchema.test.js
---
(0144540)
hgbot   
2022-12-12 16:00   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1389 [^]