Openbravo Issue Tracking System - Retail Modules
View Issue Details
0045281Retail ModulesWeb POSpublic2020-10-22 14:102020-10-23 09:15
alostale 
alostale 
normalmajorhave not tried
closedfixed 
5
 
RR21Q1 
No
0045281: infinite loop in OB.error when used in core2
When OB.error/OB.warn apis are used in a core2 app, the application gets frozen due to an infinite loop.
1. log into pos2
2. in dev tools execute: OB.error('some error')
  -> ERROR: infinite loop
The problem is caused by ob-log.js flattenArray function using underscore which is not a dependency for BL. It can be replaced by lodash.
No tags attached.
related to defect 0045085 closed jarmendariz Missing logging utilities in Business Logic 
Issue History
2020-10-22 14:10alostaleNew Issue
2020-10-22 14:10alostaleAssigned To => Retail
2020-10-22 14:10alostaleTriggers an Emergency Pack => No
2020-10-22 14:10alostaleAssigned ToRetail => alostale
2020-10-22 14:20alostaleRelationship addedrelated to 0045085
2020-10-22 14:25hgbotNote Added: 0123868
2020-10-23 09:15hgbotResolutionopen => fixed
2020-10-23 09:15hgbotStatusnew => closed
2020-10-23 09:15hgbotFixed in Version => RR21Q1
2020-10-23 09:15hgbotNote Added: 0123898
2020-10-23 09:15hgbotNote Added: 0123899

Notes
(0123868)
hgbot   
2020-10-22 14:25   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/90 [^]
(0123898)
hgbot   
2020-10-23 09:15   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: a4fa0a979782a4ee71c45c3f96701e85fbce54e5
Author: Asier Lostalé <asier.lostale@openbravo.com>
Date: 2020-10-22T14:22:22+02:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/a4fa0a979782a4ee71c45c3f96701e85fbce54e5 [^]

fixed BUG-45281: infinite loop in OB.error when used in core2

Replaced underscore's each function with lodash equivalent each in
flattenArray note both of them are able to iterate both in arrays and in
play objects, which is needed as array parameter in flattenArray is not
necessarily an array.

---
M web/org.openbravo.mobile.core/source/utils/ob-log.js
---
(0123899)
hgbot   
2020-10-23 09:15   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/90 [^]