Openbravo Issue Tracking System - Retail Modules
View Issue Details
0041269Retail ModulesWeb POSpublic2019-07-01 09:582019-08-06 16:14
aaroncalero 
ranjith_qualiantech_com 
highmajoralways
closedfixed 
5
 
RR19Q1.3RR19Q1.3 
marvintm
No
0041269: OB.UTIL.clone always copies arrays by reference
OB.UTIL.clone always copies arrays by reference, instead of generating a new array and cloning the values.
Check the code that copies array properties:
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/tip/web/org.openbravo.mobile.core/source/utils/ob-utilities.js#l1057 [^]

Instead of checking if the property is an array, the code is checking if the whole object is an array, which is wrong
In the linked code, change from
} else if (_.isArray(source)) {
to
} else if (_.isArray(source.get(key))) {
No tags attached.
blocks defect 0041207 closed ranjith_qualiantech_com OB.UTIL.clone always copies arrays by reference 
Issue History
2019-07-03 19:04marvintmTypedefect => backport
2019-07-03 19:04marvintmTarget Version => RR19Q1.3
2019-07-18 09:11hgbotCheckin
2019-07-18 09:11hgbotNote Added: 0113496
2019-07-18 09:11hgbotCheckin
2019-07-18 09:11hgbotNote Added: 0113497
2019-07-18 09:11hgbotStatusscheduled => resolved
2019-07-18 09:11hgbotResolutionopen => fixed
2019-07-18 09:11hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/b963e8c9401e7a87f8758f6a08b89677a435a2cf [^] => http://code.openbravo.com/retail/backports/3.0RR19Q1.3/org.openbravo.mobile.core/rev/c5c5884d747dba12cc254c8fa59fc0ed05fb4118 [^]
2019-08-06 16:14marvintmReview Assigned To => marvintm
2019-08-06 16:14marvintmStatusresolved => closed
2019-08-06 16:14marvintmFixed in Version => RR19Q1.3

Notes
(0113496)
hgbot   
2019-07-18 09:11   
Repository: retail/backports/3.0RR19Q1.3/org.openbravo.retail.posterminal
Changeset: 997b571b2a2d7d187596de9d960ce7e3af63298d
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Thu Jul 18 12:41:05 2019 +0530
URL: http://code.openbravo.com/retail/backports/3.0RR19Q1.3/org.openbravo.retail.posterminal/rev/997b571b2a2d7d187596de9d960ce7e3af63298d [^]

Related to issue 41269 : Shipping Address should be same as invoice address when loading paid receipt

* When splitting lines with promotions, line lineQtyOffer should be updated instead of creating new lines to apply promotions

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0113497)
hgbot   
2019-07-18 09:11   
Repository: retail/backports/3.0RR19Q1.3/org.openbravo.mobile.core
Changeset: c5c5884d747dba12cc254c8fa59fc0ed05fb4118
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Thu Jul 18 12:41:12 2019 +0530
URL: http://code.openbravo.com/retail/backports/3.0RR19Q1.3/org.openbravo.mobile.core/rev/c5c5884d747dba12cc254c8fa59fc0ed05fb4118 [^]

Fixed issue 41269 : Update OB.UTIL.clone to check the property is an Array

* When cloning object from array, if object is backbone the it should cloned recursively
  if object is not backbone, then copy of object should be pushed to target object

---
M web/org.openbravo.mobile.core/source/utils/ob-utilities.js
---