Openbravo Issue Tracking System - Retail Modules
View Issue Details
0041207Retail ModulesWeb POSpublic2019-07-01 09:582019-08-06 16:12
aaroncalero 
ranjith_qualiantech_com 
highmajoralways
closedfixed 
5
 
RR19Q4 
guilleaer
No
0041207: 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.
depends on backport 0041267RR19Q3 closed ranjith_qualiantech_com OB.UTIL.clone always copies arrays by reference 
depends on backport 0041268RR19Q2.2 closed ranjith_qualiantech_com OB.UTIL.clone always copies arrays by reference 
depends on backport 0041269RR19Q1.3 closed ranjith_qualiantech_com OB.UTIL.clone always copies arrays by reference 
patch issue 41207 source mobilecore.patch (1,271) 2019-07-02 14:56
https://issues.openbravo.com/file_download.php?file_id=13079&type=bug
Issue History
2019-07-01 09:58aaroncaleroNew Issue
2019-07-01 09:58aaroncaleroAssigned To => Retail
2019-07-01 09:58aaroncaleroResolution time => 1563141600
2019-07-01 09:58aaroncaleroTriggers an Emergency Pack => No
2019-07-01 15:16ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2019-07-01 15:17ranjith_qualiantech_comStatusnew => scheduled
2019-07-02 08:25ranjith_qualiantech_comFile Added: issue 41207 source mobilecore.patch
2019-07-02 08:30ranjith_qualiantech_comFile Deleted: issue 41207 source mobilecore.patch
2019-07-02 14:56ranjith_qualiantech_comFile Added: issue 41207 source mobilecore.patch
2019-07-03 15:36hgbotCheckin
2019-07-03 15:36hgbotNote Added: 0113155
2019-07-03 15:36hgbotStatusscheduled => resolved
2019-07-03 15:36hgbotResolutionopen => fixed
2019-07-03 15:36hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/b963e8c9401e7a87f8758f6a08b89677a435a2cf [^]
2019-07-03 16:14ranjith_qualiantech_comStatusresolved => new
2019-07-03 16:14ranjith_qualiantech_comResolutionfixed => open
2019-07-03 16:14ranjith_qualiantech_comStatusnew => scheduled
2019-07-03 19:03marvintmStatusscheduled => acknowledged
2019-07-03 19:04marvintmStatusacknowledged => scheduled
2019-07-04 08:11hgbotCheckin
2019-07-04 08:11hgbotNote Added: 0113164
2019-07-09 15:10hgbotCheckin
2019-07-09 15:10hgbotNote Added: 0113246
2019-07-09 15:11hgbotCheckin
2019-07-09 15:11hgbotNote Added: 0113247
2019-07-09 15:12ranjith_qualiantech_comStatusscheduled => resolved
2019-07-09 15:12ranjith_qualiantech_comResolutionopen => fixed
2019-07-11 15:32hgbotCheckin
2019-07-11 15:32hgbotNote Added: 0113288
2019-07-12 13:52guilleaerNote Deleted: 0113288
2019-07-12 13:56guilleaerReview Assigned To => guilleaer
2019-07-12 13:56guilleaerStatusresolved => closed
2019-07-12 13:56guilleaerFixed in Version => RR19Q4
2019-08-06 16:11marvintmStatusclosed => new
2019-08-06 16:11marvintmResolutionfixed => open
2019-08-06 16:11marvintmFixed in VersionRR19Q4 =>
2019-08-06 16:11marvintmStatusnew => scheduled
2019-08-06 16:11marvintmStatusscheduled => resolved
2019-08-06 16:11marvintmFixed in Version => RR19Q4
2019-08-06 16:11marvintmResolutionopen => fixed
2019-08-06 16:12marvintmStatusresolved => closed

Notes
(0113155)
hgbot   
2019-07-03 15:36   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: b963e8c9401e7a87f8758f6a08b89677a435a2cf
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Wed Jul 03 19:06:14 2019 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/b963e8c9401e7a87f8758f6a08b89677a435a2cf [^]

Fixed issue 41207 : 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
---
(0113164)
hgbot   
2019-07-04 08:11   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: df42e1626ff904aca1cd9cefbb8352ab88ced2df
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Thu Jul 04 11:41:11 2019 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/df42e1626ff904aca1cd9cefbb8352ab88ced2df [^]

Related to issue 41207 : Backed out changeset: b963e8c9401e

---
M web/org.openbravo.mobile.core/source/utils/ob-utilities.js
---
(0113246)
hgbot   
2019-07-09 15:10   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: d37ef4ea7391f5658befc792482537706b6a5acb
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Jul 09 18:40:09 2019 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/d37ef4ea7391f5658befc792482537706b6a5acb [^]

Related to issue 41207 : 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
---
(0113247)
hgbot   
2019-07-09 15:11   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 9b20d50ad612e475617318db3f34022e981de0ba
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Jul 09 18:40:51 2019 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/9b20d50ad612e475617318db3f34022e981de0ba [^]

Related to issue 41207 : 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
---