Openbravo Issue Tracking System - POS2
View Issue Details
0048760POS2POSpublic2022-03-10 11:122022-06-06 00:06
andre_montenegro 
meriem_azaf 
normalmajoralways
closedfixed 
5
 
 
No
0048760: [Organization Variables] Unhandled rejection error when introducing an incorrect date & cancelling
When editing an organization variable date field ("Initial Date" OR "End Date"), if user introduces a non-valid date & cancels the edition, an Unhandled rejection full screen error is displayed.
Preconditions:
 - From ERP (Backoffice), create at least one organization variable

Steps to reproduce issue:
 - Login POS2
 - Select the "Store" icon (5th element in Lateral control bar)
 - Click the option "Organization Variables"
 - Click "EDIT" button from any variable previously created & a pop up will be displayed in foreground
 - Edit "Initial Date" OR "End Date" field with a non-valid date, e.g.: 99-99-9999
 - Click "Cancel" button, wait for 1 second & observe the error screen displayed
No tags attached.
png ErrorScreen_OrganizationVariables.png (135,422) 2022-03-10 11:12
https://issues.openbravo.com/file_download.php?file_id=16726&type=bug
png
Issue History
2022-03-10 11:12andre_montenegroNew Issue
2022-03-10 11:12andre_montenegroAssigned To => Triage Platform Base
2022-03-10 11:12andre_montenegroFile Added: ErrorScreen_OrganizationVariables.png
2022-03-10 11:12andre_montenegroTriggers an Emergency Pack => No
2022-05-16 15:38cbernerAssigned ToTriage Platform Base => meriem_azaf
2022-05-18 09:10andre_montenegroSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=24105#r24105
2022-05-18 17:01hgbotNote Added: 0137454
2022-06-06 00:06hgbotNote Added: 0138077
2022-06-06 00:06hgbotResolutionopen => fixed
2022-06-06 00:06hgbotStatusnew => closed
2022-06-06 00:06hgbotNote Added: 0138078

Notes
(0137454)
hgbot   
2022-05-18 17:01   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/752 [^]
(0138077)
hgbot   
2022-06-06 00:06   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/752 [^]
(0138078)
hgbot   
2022-06-06 00:06   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^]
Changeset: 5d87981a271fb4087731da7b63f1bfa612ac9dd1
Author: Meriem Azaf <meriem.azaf@openbravo.com>
Date: 05-06-2022 22:22:49
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/5d87981a271fb4087731da7b63f1bfa612ac9dd1 [^]

Fixes ISSUE-48760: [Organization Variables] Unhandled rejection error when introducing an incorrect date & cancelling

When editing an organization variable date field ("Initial Date" OR "End Date"), if user introduces a non-valid date & cancels the edition, an Unhandled rejection full screen error is displayed after clicking in the cancel button.

After clicking in this button, we don't need to do extra validations. So to fix this, we put a condition about the current variable in the function doExtraValidations in orgVariable.jsx.

---
M web-jspack/org.openbravo.core2/src/components/OrgVariables/OrgVariables.jsx
---