Openbravo Issue Tracking System - POS2
View Issue Details
0047652POS2POSpublic2021-09-08 12:122021-09-16 11:45
timothee_catteeuw 
jarmendariz 
normalminoralways
closedfixed 
5
 
TAP 
No
0047652: Offline - Approval does work but confusing messages are displayed
Following the resolution of that mantis --> https://issues.openbravo.com/view.php?id=47215 [^]
Approval in offline mode works well but after approving the action for the user, a message is displayed at the bottom right each time you approve an action (this message is "Application server is not available")

This message can be confusing for the users who could think the action is not done. Yet it is correctly done.
Case 1 (when action can be done by the user even if the system is in offline mode)
1. In BO, set an user action to "Require approval" for a user (User 1) and "Can use and approve" for an other (User 2) --> example : deleteLine or deleteTicket
2. Connect to POS with User 1
3. Try to do the action with approval
4. Enter User 2 credential to approve --> approval is ok without error message
5. Disconnect network from OB Central
6. Try to do the same action with approval
7. Enter User 2 credential to approve --> approval is ok but an error message appears at the bottom
Remove this message because it does not make sense since there is no error.
Or adapt it (information message for example instead of it)
No tags attached.
depends on backport 0047663TAP closed jarmendariz Offline - Approval does work but confusing messages are displayed 
related to defect 0047745TAP closed Felixaka JIRA 2140 - approval in offline works but it is necessary to do each approval at least once before in online 
Issue History
2021-09-08 12:12timothee_catteeuwNew Issue
2021-09-08 12:12timothee_catteeuwAssigned To => Retail
2021-09-08 12:12timothee_catteeuwTriggers an Emergency Pack => No
2021-09-09 11:18dmiguelezAssigned ToRetail => platform
2021-09-09 11:18dmiguelezStatusnew => acknowledged
2021-09-09 11:18dmiguelezStatusacknowledged => scheduled
2021-09-09 11:19dmiguelezStatusscheduled => acknowledged
2021-09-09 15:47dmiguelezSeveritymajor => minor
2021-09-10 07:00alostaleNote Added: 0131692
2021-09-15 14:33jarmendarizAssigned Toplatform => jarmendariz
2021-09-15 18:41hgbotNote Added: 0131835
2021-09-16 11:45hgbotResolutionopen => fixed
2021-09-16 11:45hgbotStatusacknowledged => closed
2021-09-16 11:45hgbotNote Added: 0131861
2021-09-16 11:45hgbotNote Added: 0131862
2021-09-23 10:49alostaleRelationship addedrelated to 0047745

Notes
(0131692)
alostale   
2021-09-10 07:00   
There are two different cases:

1. POS is offline but it's not aware of it as no request to backend has been performed yet (online icon is green). The first request in online is done to check approvals and it detects it is offline, so icon goes red.

2. It was detected to be offline (icon was already red). In this case, approval flow is done offline not even trying to do any request.

In case 1 it is fine to display the message because, as in any other flow, it is notifying the user the fact POS is going offline. In case 2, though, the message should not be displayed.
(0131835)
hgbot   
2021-09-15 18:41   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/630 [^]
(0131861)
hgbot   
2021-09-16 11:45   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^]
Changeset: 5939d7eb409ba2771a6852f8819b8e476fec0c47
Author: Javier Armendáriz <javier.armendariz@openbravo.com>
Date: 2021-09-16T09:44:50+00:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/5939d7eb409ba2771a6852f8819b8e476fec0c47 [^]

Fixed ISSUE-47652: Incorrect error message appears after approval in offline mode.

This fix prevents the error messages to appear after requesting approval in offline mode.
However, if the server is offline but the application is not aware of that, the first time we request
for approval the request will fail and the error message will appear. Once transitioned to offline,
subsequent approvals will work as expected without errors.

---
M web-jspack/org.openbravo.core2/src/core/security/ApprovalChecker.js
M web-jspack/org.openbravo.core2/src/core/security/__test__/ApprovalChecker.test.js
---
(0131862)
hgbot   
2021-09-16 11:45   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/630 [^]