Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0032415 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] Web POS | major | sometimes | 2016-03-05 16:29 | 2016-03-30 18:20 | |||
Reporter | Orekaria | View Status | public | |||||
Assigned To | aaroncalero | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | RR16Q2 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 410127cfc57e | ||||
Projection | none | ETA | none | Target Version | RR16Q2 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | Orekaria | |||||||
OBNetwork customer | No | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0032415: [Services] Asynchronous processes can corrupt receipt data | |||||||
Description | Asynchronous processes can corrupt receipt data The problem is that lasting asynchronous processes are still being executed while the application is available for user actions | |||||||
Steps To Reproduce | A. Apply the attached patch Create or execute a test with a single line receipt (e.g: CreateSaleWithEAN Verify that the console shows log similar to (tweak the patch timeouts so 'first' is before 'second'): 6478 [Thread-0] INFO CreateSaleWithEAN - Tap on 'BUTTON_PAY_DONE' 6553 [Thread-0] WARN CreateSaleWithEAN - Allowed (exclusion): http://192.168.1.35:8080/openbravo/web/js/gen/726b345e9ea7139b002dfb0550badbf2_WebPOS.js [^] 30261:17 [dev] first 6553 [Thread-0] INFO CreateSaleWithEAN - Verifying that 'LABEL_TOTALTOPAY' = '0.00' 7594 [Thread-0] WARN CreateSaleWithEAN - TestRegistry has been forced to refresh 7646 [Thread-0] WARN CreateSaleWithEAN - Allowed (exclusion): http://192.168.1.35:8080/openbravo/web/js/gen/726b345e9ea7139b002dfb0550badbf2_WebPOS.js [^] 22329:25 [dev] second 8702 [Thread-0] WARN CreateSaleWithEAN - TestRegistry has been forced to refresh 8768 [Thread-0] INFO CreateSaleWithEAN - After test verifications 8792 [Thread-0] INFO CreateSaleWithEAN - Synchronizing terminal and server 9097 [Thread-0] INFO CreateSaleWithEAN - There are no pending POST or GET requests to the server 9101 [Thread-0] INFO CreateSaleWithEAN - Waiting for the 'c_import_entry' to process all 'Initial' records 10104 [Thread-0] INFO CreateSaleWithEAN - Waiting for the 'c_import_entry' to process all 'Initial' records 12283 [main] INFO CreateSaleWithEAN - Test failed 12606 [main] INFO CreateSaleWithEAN - Screenshot taken: </tmp/tip/last-results/openbravo/screenshots/17:11:28 FAILED: CreateSaleWithEAN.png> 12606 [main] INFO CreateSaleWithEAN - *** Error: *** org.junit.internal.runners.model.MultipleFailureException: There were 2 errors: java.lang.AssertionError((1) errors in the browser log: [2016-03-05T17:11:24+0100] [SEVERE] http://192.168.1.35:8080/openbravo/web/js/gen/726b345e9ea7139b002dfb0550badbf2_WebPOS.js [^] 2561:19 The receipt has been modified while it was being closed: { "lines": { "0": { "hasRelatedServices": [ null, false ] } } } B. See also attached image | |||||||
Proposed Solution | Follow the asynchronous flows of the The 'addProductToOrder' method in order.js a- Ensure that since the method is executed until it finishes, the SynchronizationHelper is blocking the pay button b- Deasynchronize the flow | |||||||
Tags | No tags attached. | |||||||
Attached Files | ![]() ![]() ![]() ![]() ![]() | |||||||
![]() |
||||||||
|
![]() |
|
(0084768) aaroncalero (viewer) 2016-03-07 12:09 |
Attached possible solution. The 'blocking range' of the SynchronizationHelper has been extended while calculating if a product has services or not. |
(0084870) hgbot (developer) 2016-03-10 16:39 |
Repository: erp/pmods/org.openbravo.retail.posterminal Changeset: 8fe534dc24be39218ca3f60e599a25554890c1c4 Author: Aaron Calero <aaron.calero <at> openbravo.com> Date: Wed Mar 09 09:53:33 2016 +0100 URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/8fe534dc24be39218ca3f60e599a25554890c1c4 [^] Fixed issue 32415: [Services] Asynchronous processes can corrupt receipt data --- M web/org.openbravo.retail.posterminal/js/model/order.js --- |
(0085343) Orekaria (viewer) 2016-03-30 16:43 |
OB.UTIL.SynchronizationHelper.finished(synchId, 'HasServices'); must be closed if the following condition is not fullfilled if (me.get('lines').contains(line)) { |
(0085344) hgbot (developer) 2016-03-30 17:31 |
Repository: erp/pmods/org.openbravo.retail.posterminal Changeset: 410127cfc57ee72b2e4660d2a5cb1e87d04c3972 Author: Aaron Calero <aaron.calero <at> openbravo.com> Date: Wed Mar 30 17:30:05 2016 +0200 URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/410127cfc57ee72b2e4660d2a5cb1e87d04c3972 [^] Fixed issue 32415: [Services] Asynchronous processes can corrupt receipt data Added SynchronizationHelper closing for the HasServices process, when the line is removed during the calculateReceipt process (e.g. this can happen if taxes cannot be calculated) --- M web/org.openbravo.retail.posterminal/js/model/order.js --- |
![]() |
|||
Date Modified | Username | Field | Change |
2016-03-05 16:29 | Orekaria | New Issue | |
2016-03-05 16:29 | Orekaria | Assigned To | => Retail |
2016-03-05 16:29 | Orekaria | OBNetwork customer | => No |
2016-03-05 16:29 | Orekaria | Triggers an Emergency Pack | => No |
2016-03-05 16:29 | Orekaria | Proposed Solution updated | |
2016-03-05 16:32 | Orekaria | Description Updated | View Revisions |
2016-03-05 16:32 | Orekaria | Steps to Reproduce Updated | View Revisions |
2016-03-05 16:32 | Orekaria | Steps to Reproduce Updated | View Revisions |
2016-03-05 16:35 | Orekaria | Summary | [Services] The 'addProductToOrder' asynchronous processes can break the receipt coherence => [Services] The 'addProductToOrder' asynchronous processes can corrupt receipt data |
2016-03-05 16:35 | Orekaria | Description Updated | View Revisions |
2016-03-05 16:48 | Orekaria | Summary | [Services] The 'addProductToOrder' asynchronous processes can corrupt receipt data => [Services] Asynchronous processes can corrupt receipt data |
2016-03-05 16:48 | Orekaria | Description Updated | View Revisions |
2016-03-05 16:52 | Orekaria | Steps to Reproduce Updated | View Revisions |
2016-03-05 17:05 | Orekaria | File Added: reproduceTheIssue.patch | |
2016-03-05 17:13 | Orekaria | Steps to Reproduce Updated | View Revisions |
2016-03-05 17:26 | Orekaria | File Added: .png | |
2016-03-05 17:26 | Orekaria | Steps to Reproduce Updated | View Revisions |
2016-03-05 17:35 | Orekaria | File Added: test failure2.png | |
2016-03-05 20:02 | Orekaria | File Added: test failure3.png | |
2016-03-07 12:09 | aaroncalero | File Added: FixIssue32415.diff | |
2016-03-07 12:09 | aaroncalero | Note Added: 0084768 | |
2016-03-07 12:12 | aaroncalero | Relationship added | related to 0032070 |
2016-03-07 16:53 | aaroncalero | File Deleted: FixIssue32415.diff | |
2016-03-07 16:54 | aaroncalero | File Added: FixIssue32415.diff | |
2016-03-10 16:39 | hgbot | Checkin | |
2016-03-10 16:39 | hgbot | Note Added: 0084870 | |
2016-03-10 16:39 | hgbot | Status | new => resolved |
2016-03-10 16:39 | hgbot | Resolution | open => fixed |
2016-03-10 16:39 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/8fe534dc24be39218ca3f60e599a25554890c1c4 [^] |
2016-03-11 09:01 | marvintm | Assigned To | Retail => Orekaria |
2016-03-18 08:43 | aaroncalero | Review Assigned To | => Orekaria |
2016-03-18 08:43 | aaroncalero | Assigned To | Orekaria => aaroncalero |
2016-03-30 16:41 | Orekaria | Status | resolved => new |
2016-03-30 16:41 | Orekaria | Resolution | fixed => open |
2016-03-30 16:41 | Orekaria | Status | new => scheduled |
2016-03-30 16:43 | Orekaria | Note Added: 0085343 | |
2016-03-30 17:31 | hgbot | Checkin | |
2016-03-30 17:31 | hgbot | Note Added: 0085344 | |
2016-03-30 17:31 | hgbot | Status | scheduled => resolved |
2016-03-30 17:31 | hgbot | Resolution | open => fixed |
2016-03-30 17:31 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/8fe534dc24be39218ca3f60e599a25554890c1c4 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/410127cfc57ee72b2e4660d2a5cb1e87d04c3972 [^] |
2016-03-30 18:20 | Orekaria | Status | resolved => closed |
2016-03-30 18:20 | Orekaria | Fixed in Version | => RR16Q2 |
Copyright © 2000 - 2009 MantisBT Group |