Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0030479
TypeCategorySeverityReproducibilityDate SubmittedLast Update
design defect[Retail Modules] Web POSmajoralways2015-07-31 20:532015-09-09 16:07
ReporterOrekariaView Statuspublic 
Assigned ToOrekaria 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision4bee35aa96e0
ProjectionnoneETAnoneTarget VersionRR15Q4
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomarvintm
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0030479: Stabilization: Creating a clone of an object should not fire any event

DescriptionStabilization: Creating a clone of an object should not fire any event

The clone information could be compromised
Steps To Reproducea) 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'
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0030805 closedOrekaria Clone of the receipt is no longer necessary, so it should be reverted 
blocks defect 0030465RR15Q4 closedOrekaria Stabillization: When the receipt is done, an immutable copy of it should be used in the involved asynchronous processes 
blocks defect 0030598RR15Q4 closedOrekaria Stabilization: 'receipt.clearWith' is used when 'OB.UTIL.clone' should 
blocks defect 0030603RR15Q4 closedOrekaria Stabilization: RR15Q4 related issues 

-  Notes
(0079162)
hgbot (developer)
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 (developer)
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
---
(0079197)
Orekaria (administrator)
2015-08-05 09:49

Cloning is still firing the events of the collections. e.g: the 'add' event
(0079594)
hgbot (developer)
2015-08-22 20:33

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 9a602b16dabd46b7e403a073dbaab6dca1302ab0
Author: Rafa Alonso <ral <at> openbravo.com>
Date: Sat Aug 22 20:32:29 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/9a602b16dabd46b7e403a073dbaab6dca1302ab0 [^]

Related to issue 30450, preamble of issue 30479: jsLint 'ob-utilities'

---
M web/org.openbravo.mobile.core/source/utils/ob-utilities.js
---
(0079595)
hgbot (developer)
2015-08-22 20:33

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: c7fbbb35474894ca7c1045a75fd71b564c578167
Author: Rafa Alonso <ral <at> openbravo.com>
Date: Sat Aug 22 20:32:29 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/c7fbbb35474894ca7c1045a75fd71b564c578167 [^]

Related to issue 30479: Improved OB.UTIL.clone logic

- provide a way to externally decide if events will be fired

---
M web/org.openbravo.mobile.core/source/utils/ob-utilities.js
---
(0079601)
hgbot (developer)
2015-08-22 20:35

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 9f29c3232006fb2eb42be52925419e32fad1991b
Author: Rafa Alonso <ral <at> openbravo.com>
Date: Sat Aug 22 20:32:55 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/9f29c3232006fb2eb42be52925419e32fad1991b [^]

Related to issue 30479: OB.UTIL.clone does not make use of a third argument

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0079605)
hgbot (developer)
2015-08-22 20:35

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 4bee35aa96e047e8ee5ecadc7ffc489710a5d3e4
Author: Rafa Alonso <ral <at> openbravo.com>
Date: Sat Aug 22 20:32:55 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/4bee35aa96e047e8ee5ecadc7ffc489710a5d3e4 [^]

Fixes issue 30479: The 'current' receipt must be an exact clone of the UI receipt

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0079624)
hgbot (developer)
2015-08-22 20:36

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 7a416fea761a03602edf94d368c48fcb73517bfc
Author: Rafa Alonso <ral <at> openbravo.com>
Date: Sat Aug 22 20:32:56 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/7a416fea761a03602edf94d368c48fcb73517bfc [^]

Related to issue 30479: The UI receipt triggers events if it's the target in OB.UTIL.clone

---
M web/org.openbravo.retail.posterminal/js/pointofsale/model/pointofsale-model.js
---
(0079626)
hgbot (developer)
2015-08-22 20:39

Repository: tools/automation/pi-mobile
Changeset: 97ad0882c2a3f3e6e5df66d546d9bf2409726bb9
Author: Rafa Alonso <ral <at> openbravo.com>
Date: Sat Aug 22 20:26:14 2015 +0200
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/97ad0882c2a3f3e6e5df66d546d9bf2409726bb9 [^]

Related to issue 30479: Added the 'I30479_VerifyUIReceiptIsMarked' test

---
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/system/I30479_VerifyUIReceiptIsMarked.java
---

- 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 View Revisions
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 View Revisions
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


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker