Openbravo Issue Tracking System - Retail Modules |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0030479 | Retail Modules | Web POS | public | 2015-07-31 20:53 | 2015-09-09 16:07 |
|
Reporter | Orekaria | |
Assigned To | Orekaria | |
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | RR15Q4 | Fixed in Version | | |
Merge Request Status | |
Review Assigned To | marvintm |
OBNetwork customer | |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0030479: Stabilization: Creating a clone of an object should not fire any event |
Description | Stabilization: Creating a clone of an object should not fire any event
The clone information could be compromised |
Steps To Reproduce | a) Verify that 'OB.UTIL.clone' in 'ob-utilities.js' is setting values without the 'silent: true' flag
b) Verify that when an object is cloned, the 'changed' event is fired for each of the set properties
c) Performance: execute with and without 'silent: true', the following script in the console log:
var startTime = new Date();
var receipt = new OB.Model.Order();
for (var i = 0; i < 100; i++) {
var frozenReceipt = new OB.Model.Order();
OB.UTIL.clone(receipt, frozenReceipt);
}
var endTime = new Date();
var timeDiff = endTime - startTime;
console.error(timeDiff);
Verify that the time spent in the cloning is about 10% less when 'silent: true' |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | defect | 0030805 | | closed | Orekaria | Clone of the receipt is no longer necessary, so it should be reverted | blocks | defect | 0030465 | RR15Q4 | closed | Orekaria | Stabillization: When the receipt is done, an immutable copy of it should be used in the involved asynchronous processes | blocks | defect | 0030598 | RR15Q4 | closed | Orekaria | Stabilization: 'receipt.clearWith' is used when 'OB.UTIL.clone' should | blocks | defect | 0030603 | RR15Q4 | closed | Orekaria | Stabilization: RR15Q4 related issues |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2015-07-31 20:53 | Orekaria | New Issue | |
2015-07-31 20:53 | Orekaria | Assigned To | => Orekaria |
2015-07-31 20:53 | Orekaria | Triggers an Emergency Pack | => No |
2015-07-31 21:15 | Orekaria | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=9134#r9134 |
2015-07-31 23:15 | hgbot | Checkin | |
2015-07-31 23:15 | hgbot | Note Added: 0079162 | |
2015-07-31 23:15 | hgbot | Status | new => resolved |
2015-07-31 23:15 | hgbot | Resolution | open => fixed |
2015-07-31 23:15 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/2f463b608c3fef7d3835ba0d99c1e008c9b00c22 [^] |
2015-08-03 21:21 | hgbot | Checkin | |
2015-08-03 21:21 | hgbot | Note Added: 0079166 | |
2015-08-03 21:21 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/2f463b608c3fef7d3835ba0d99c1e008c9b00c22 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/3bcb9a8e5e7dd2d7c65d94701685fadfe7088aa4 [^] |
2015-08-05 09:49 | Orekaria | Note Added: 0079197 | |
2015-08-18 18:47 | Orekaria | Status | resolved => new |
2015-08-18 18:47 | Orekaria | Resolution | fixed => open |
2015-08-18 18:47 | Orekaria | Relationship added | blocks 0030465 |
2015-08-18 23:12 | Orekaria | Relationship added | blocks 0030598 |
2015-08-19 10:01 | Orekaria | Description Updated | bug_revision_view_page.php?rev_id=9234#r9234 |
2015-08-19 12:33 | Orekaria | Relationship added | blocks 0030603 |
2015-08-22 10:10 | Orekaria | Target Version | => RR15Q4 |
2015-08-22 20:33 | hgbot | Checkin | |
2015-08-22 20:33 | hgbot | Note Added: 0079594 | |
2015-08-22 20:33 | hgbot | Checkin | |
2015-08-22 20:33 | hgbot | Note Added: 0079595 | |
2015-08-22 20:35 | hgbot | Checkin | |
2015-08-22 20:35 | hgbot | Note Added: 0079601 | |
2015-08-22 20:35 | hgbot | Checkin | |
2015-08-22 20:35 | hgbot | Note Added: 0079605 | |
2015-08-22 20:35 | hgbot | Status | new => resolved |
2015-08-22 20:35 | hgbot | Resolution | open => fixed |
2015-08-22 20:35 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/3bcb9a8e5e7dd2d7c65d94701685fadfe7088aa4 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/4bee35aa96e047e8ee5ecadc7ffc489710a5d3e4 [^] |
2015-08-22 20:36 | hgbot | Checkin | |
2015-08-22 20:36 | hgbot | Note Added: 0079624 | |
2015-08-22 20:39 | hgbot | Checkin | |
2015-08-22 20:39 | hgbot | Note Added: 0079626 | |
2015-09-09 16:07 | marvintm | Relationship added | related to 0030805 |
2015-09-09 16:07 | marvintm | Review Assigned To | => marvintm |
2015-09-09 16:07 | marvintm | Status | resolved => closed |
Notes |
|
(0079162)
|
hgbot
|
2015-07-31 23:15
|
|
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 2f463b608c3fef7d3835ba0d99c1e008c9b00c22
Author: Rafa Alonso <ral <at> openbravo.com>
Date: Fri Jul 31 22:13:31 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/2f463b608c3fef7d3835ba0d99c1e008c9b00c22 [^]
Fixes issue 30479: The clone object will only create a copy, it will not fire any event
The problem is that firing events can have unexpected consecuences
This is a risky change. The current integration reports no error. Theoretically this change helps stabilization but there is an scenario in which this change could lead to errors: in case the clone is expected to fire the events. Note that for this special case there is another method call 'clearWith' that should be used.
A constraint has been added while in development to help developers not to fire errors when changing this method
---
M web/org.openbravo.mobile.core/source/utils/ob-utilities.js
---
|
|
|
(0079166)
|
hgbot
|
2015-08-03 21:21
|
|
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 3bcb9a8e5e7dd2d7c65d94701685fadfe7088aa4
Author: Rafa Alonso <ral <at> openbravo.com>
Date: Mon Aug 03 21:20:53 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/3bcb9a8e5e7dd2d7c65d94701685fadfe7088aa4 [^]
Fixes issue 30479: The clone object will only create a copy, it will not fire any event (II)
The problem with the previous change was that unsubscribing the 'all' event was unsubscribing wanted listeners
- the code has been modified to use a reusable 'all' event
- the 'isBeingCloned' value is now available for any model that has been cloned at least once
---
M web/org.openbravo.mobile.core/source/utils/ob-utilities.js
---
|
|
|
|
Cloning is still firing the events of the collections. e.g: the 'add' event |
|
|
(0079594)
|
hgbot
|
2015-08-22 20:33
|
|
|
|
(0079595)
|
hgbot
|
2015-08-22 20:33
|
|
|
|
(0079601)
|
hgbot
|
2015-08-22 20:35
|
|
|
|
(0079605)
|
hgbot
|
2015-08-22 20:35
|
|
|
|
(0079624)
|
hgbot
|
2015-08-22 20:36
|
|
|
|
(0079626)
|
hgbot
|
2015-08-22 20:39
|
|
|