Openbravo Issue Tracking System - POS2 | ||||||||||||
View Issue Details | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
0050629 | POS2 | Core | public | 2022-10-25 12:13 | 2022-10-25 12:13 | |||||||
Reporter | cberner | |||||||||||
Assigned To | Triage Platform Base | |||||||||||
Priority | normal | Severity | major | Reproducibility | have not tried | |||||||
Status | new | Resolution | open | |||||||||
Platform | OS | 5 | OS Version | |||||||||
Product Version | ||||||||||||
Target Version | Fixed in Version | |||||||||||
Merge Request Status | ||||||||||||
Review Assigned To | ||||||||||||
OBNetwork customer | ||||||||||||
Support ticket | ||||||||||||
Regression level | ||||||||||||
Regression date | ||||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | ||||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0050629: You may not call store.getState() error when calling OB.error from discount comparator engine | |||||||||||
Description | An error appears related with TerminalLog state action being called from inside another state action. "You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store." This is due to calling OB.error from inside comparator-evaluator.js file in discounts.propertycondition module: https://gitlab.com/openbravo/product/pmods/org.openbravo.discounts.propertycondition/-/blob/master/web/org.openbravo.discounts.propertycondition/js/engine/comparator-evaluator.js#L23 [^] This call to OB.error fails with the attached gif when it is called as part of the Ticket modelhooks, which recalculate totals and discounts. | |||||||||||
Steps To Reproduce | 1. Login backoffice and go to discounts and promotions 2. Add a CRM Property Condition with a not supported reference. This can be achieved by creating a new comparator in Comparator window(as system admin), or by changing one of the CRM Properties in CRM Configuration window to have reference Autocomplete(currently not supported) 3. Login WebPOS and refresh masterdata 4. Try to add any product and see that you get extra errors | |||||||||||
Proposed Solution | Try not to execute OB.error from inside other actions, maybe we can use a "throw new Error" instead of OB.error in this particular case. | |||||||||||
Additional Information | ||||||||||||
Tags | No tags attached. | |||||||||||
Relationships |
| |||||||||||
Attached Files | error storeGetStore.gif (1,094,575) 2022-10-25 12:13 https://issues.openbravo.com/file_download.php?file_id=17706&type=bug callStack getState.png (108,490) 2022-10-25 12:13 https://issues.openbravo.com/file_download.php?file_id=17707&type=bug | |||||||||||
Issue History | ||||||||||||
Date Modified | Username | Field | Change | |||||||||
2022-10-25 12:13 | cberner | New Issue | ||||||||||
2022-10-25 12:13 | cberner | Assigned To | => Triage Platform Base | |||||||||
2022-10-25 12:13 | cberner | File Added: error storeGetStore.gif | ||||||||||
2022-10-25 12:13 | cberner | Triggers an Emergency Pack | => No | |||||||||
2022-10-25 12:13 | cberner | File Added: callStack getState.png | ||||||||||
2022-10-25 15:49 | rafaroda | Relationship added | related to 0050626 |
There are no notes attached to this issue. |