Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||||
ID | ||||||||||||
0050629 | ||||||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
defect | [POS2] Core | major | have not tried | 2022-10-25 12:13 | 2022-10-25 12:13 | |||||||
Reporter | cberner | View Status | public | |||||||||
Assigned To | Triage Platform Base | |||||||||||
Priority | normal | Resolution | open | Fixed in Version | ||||||||
Status | new | Fix in branch | Fixed in SCM revision | |||||||||
Projection | none | ETA | none | Target Version | ||||||||
OS | Any | Database | Any | Java version | ||||||||
OS Version | Database version | Ant version | ||||||||||
Product Version | SCM revision | |||||||||||
Review Assigned To | ||||||||||||
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. | |||||||||||
Tags | No tags attached. | |||||||||||
Attached Files | error storeGetStore.gif [^] (1,094,575 bytes) 2022-10-25 12:13 callStack getState.png [^] (108,490 bytes) 2022-10-25 12:13 | |||||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||
|
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 |
Copyright © 2000 - 2009 MantisBT Group |