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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0039228
TypeCategorySeverityReproducibilityDate SubmittedLast Update
design defect[Retail Modules] Web POSmajorrandom2018-09-05 12:202018-10-18 16:38
ReportermarvintmView Statuspublic 
Assigned Tomigueldejuana 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisioncfb6a93c38e8
ProjectionnoneETAnoneTarget Version
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

0039228: Receipt object is global and therefore can be modified after the user has confirmed that the ticket should be processed

DescriptionCurrently the receipt object is global, accessible by different asynchronous processes, and therefore as the process to complete the receipt is asynchronous, it is possible that modifications happen after the user has confirmed that the ticket should be processed.

It is not possible to avoid the execution of parallel asynchronous processes. However, it is possible to avoid that the execution of these processes changes the information of the current receipt, by cloning the information of the ticket synchronously when the ticket completion process starts, so that from that point on, the cloned ticket is used to execute the completion process.
Steps To ReproduceDue to the nature of the issue, the main problems it causes are only visible randomly in different ways. An example of an issue caused indirectly by this problem is the following:

https://issues.openbravo.com/view.php?id=39219 [^]
Proposed Solution- Ticket should be cloned in a synchronized way at the start of the ticket completion process.
- The clone of the ticket should be used by the remaining actions in the ticket completion process.
- Even though the WebSQL database could in theory be a problem as it is another global point shared by all processes, so another process could save, and therefore overwrite the ticket with incorrect or outdated information in theory, in practice this should no longer be possible due to the implementation of the "hasbeenmodified" check while saving the record, which should prevent this problem from happening.
TagsNo tags attached.
Attached Filesdiff file icon mobileCore17q2.diff [^] (6,451 bytes) 2018-10-18 10:30 [Show Content]
diff file icon mobileCore17Q33.diff [^] (10,822 bytes) 2018-10-18 10:30 [Show Content]
diff file icon posterminal17q2.diff [^] (18,856 bytes) 2018-10-18 10:30 [Show Content]
diff file icon posterminal17Q33.diff [^] (23,825 bytes) 2018-10-18 10:30 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0039219 closedmigueldejuana Order is imported without lines if Supr is pressed more than once after Done is launched 
depends on backport 0039393RR18Q3.2 closedmigueldejuana Receipt object is global and therefore can be modified after the user has confirmed that the ticket should be processed 
depends on backport 0039484RR18Q2.4 closedmigueldejuana Receipt object is global and therefore can be modified after the user has confirmed that the ticket should be processed 
related to defect 0038862 closedmigueldejuana Ticket completion should be executed fully inside the same database transaction 
related to defect 0041067 closedmigueldejuana Cash management object is global and therefore can be modified after the user has confirmed that the ticket should be processed 

-  Notes
(0106945)
hgbot (developer)
2018-09-22 12:22

Repository: erp/pmods/org.openbravo.certification.france
Changeset: a7ea20a0029d388fec5512a62311c76fe5cea1f3
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Sat Sep 22 12:18:11 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.certification.france/rev/a7ea20a0029d388fec5512a62311c76fe5cea1f3 [^]

Fixed issue 0039228: Receipt object is global and therefore can be modified after the user has confirmed that the ticket should be processed

- Mark the order to do not be saved in local database

---
M web/org.openbravo.certification.france/js/ticket/preOrderSaveFinishCancelLayawayHook.js
---
(0106955)
hgbot (developer)
2018-09-24 11:44

Repository: erp/pmods/org.openbravo.certification.france
Changeset: 3502cba26576595e7c7b18416bfc89a86979f334
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Mon Sep 24 11:43:56 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.certification.france/rev/3502cba26576595e7c7b18416bfc89a86979f334 [^]

Fixed issue 0039228: Receipt object is global and therefore can be modified after the user has confirmed that the ticket should be processed

- Update hash

---
M src-db/database/sourcedata/AD_MODULE.xml
---
(0106956)
hgbot (developer)
2018-09-24 11:44

Repository: erp/pmods/org.openbravo.certification.france.testing
Changeset: 8eb582e6320f09f83b3edf62e3535dc7c94a31ae
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Mon Sep 24 11:44:23 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.certification.france.testing/rev/8eb582e6320f09f83b3edf62e3535dc7c94a31ae [^]

Fixed issue 0039228: Receipt object is global and therefore can be modified after the user has confirmed that the ticket should be processed

- Update hash

---
M src-test/org/openbravo/certification/france/testing/blockchain/test/OBCFRiModuleVerification.java
---
(0106998)
hgbot (developer)
2018-09-25 11:25

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 6910f55260f8b13d080357ae85a428873df444aa
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Wed Sep 19 13:25:48 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/6910f55260f8b13d080357ae85a428873df444aa [^]

Fixed issue 0039228: Receipt object is global and therefore can be modified after the user has confirmed that the ticket should be processed

- Instead of do a get and then an update, do directly and update checking the column hasbeenpaid instead of the json.

---
M web/org.openbravo.mobile.core/source/data/ob-dal.js
---
(0107000)
hgbot (developer)
2018-09-25 11:25

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: c8bfb5a83a52b30c5bf5e0d1496f83f48b97a5f5
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Wed Sep 19 13:26:56 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c8bfb5a83a52b30c5bf5e0d1496f83f48b97a5f5 [^]

Fixed issue 0039228: Receipt object is global and therefore can be modified after the user has confirmed that the ticket should be processed

- Remove unnedeed save after the order is frozen

---
M web/org.openbravo.retail.posterminal/js/utils/ticketCloseUtils.js
---
(0107001)
hgbot (developer)
2018-09-25 11:25

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 937b88dcb5907541cfb6842ab982750408c486ea
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Wed Sep 19 17:52:49 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/937b88dcb5907541cfb6842ab982750408c486ea [^]

Fixed issue 0039228: Receipt object is global and therefore can be modified after the user has confirmed that the ticket should be processed

- Freeze the receipt to avoid overridding the object before sending it to the backend.
- Keep the diff validation (diffReceipt)
- Do a clearWith with frozenReceipt over receipt to set al values and launch all changes events
- Launch triggers over receipt to launch listeners

---
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
M web/org.openbravo.retail.posterminal/js/utils/ticketCloseUtils.js
---
(0107002)
hgbot (developer)
2018-09-25 11:25

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 21b7af32d1dd83a9371ee2974641e61f61333cca
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Sat Sep 22 12:16:01 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/21b7af32d1dd83a9371ee2974641e61f61333cca [^]

Fixed issue 0039228: Receipt object is global and therefore can be modified after the user has confirmed that the ticket should be processed

- Do the clearWith of the frozenReceipt before creating next order
- Save before in the code in Multiorders Layaways coming from server
- Do not save locally quotations and cancel orders

---
M web/org.openbravo.retail.posterminal/js/components/modalmultiorders.js
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
M web/org.openbravo.retail.posterminal/js/model/order.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/pointofsale.js
---
(0107003)
hgbot (developer)
2018-09-25 11:25

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: bbd60d8feedd6d60e12885322de6f91eac948e9d
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Mon Sep 24 12:00:43 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/bbd60d8feedd6d60e12885322de6f91eac948e9d [^]

Fixed issue 0039228: Receipt object is global and therefore can be modified after the user has confirmed that the ticket should be processed

- Do not save frozenReceiptif hasbeenpaid='Y'

---
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
---
(0107004)
hgbot (developer)
2018-09-25 11:25

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: a8ea661c6af12b28c46df3a464c0396ac5b4e41a
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Mon Sep 24 17:10:21 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/a8ea661c6af12b28c46df3a464c0396ac5b4e41a [^]

Fixed issue 0039228: Receipt object is global and therefore can be modified after the user has confirmed that the ticket should be processed

. Set again diffReceipt with the frozenReceipt

---
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
---
(0107005)
hgbot (developer)
2018-09-25 11:25

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 57d2a0c4bc8515edcf7470a121683274de8402f3
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Tue Sep 25 08:42:00 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/57d2a0c4bc8515edcf7470a121683274de8402f3 [^]

Fixed issue 0039228: Receipt object is global and therefore can be modified after the user has confirmed that the ticket should be processed

- Remove empty line

---
M web/org.openbravo.retail.posterminal/js/utils/ticketCloseUtils.js
---
(0107006)
hgbot (developer)
2018-09-25 11:25

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 1c4983d51309bddac5c9d47917e65e49fad9051d
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Tue Sep 25 09:28:02 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/1c4983d51309bddac5c9d47917e65e49fad9051d [^]

Fixed issue 0039228: Receipt object is global and therefore can be modified after the user has confirmed that the ticket should be processed

- Do not save frozenReceipt after sync it

---
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
---
(0107045)
hgbot (developer)
2018-09-27 10:38

Repository: erp/pmods/org.openbravo.retail.stockvalidation
Changeset: dcd5184888e81af6d66d9c76e656c0642c37d1d2
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Thu Sep 27 10:37:47 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.stockvalidation/rev/dcd5184888e81af6d66d9c76e656c0642c37d1d2 [^]

Fixed issue 0039228: Receipt object is global and therefore can be modified after the user has confirmed that the ticket should be processed

- We do a clearWith using frozenReceipt and this launches again stockvalidation. Avoid this

---
M web/org.openbravo.retail.stockvalidation/js/modals.js
---
(0107071)
marvintm (manager)
2018-09-28 13:18

There is a problem in synchronized mode, hasbeenpaid remains as 'Y' if request to OrderLoader fails with error, which means that the ticket cannot be completed anyore.
(0107073)
hgbot (developer)
2018-09-28 14:09

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: cfb6a93c38e8961d10cd7364d1337287a255a182
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Fri Sep 28 14:09:03 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/cfb6a93c38e8961d10cd7364d1337287a255a182 [^]

Fixed issue 0039228: Receipt object is global and therefore can be modified after the user has confirmed that the ticket should be processed

- Restore receipt, frozenReceipt is just to send it to the server

---
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
---

- Issue History
Date Modified Username Field Change
2018-09-05 12:20 marvintm New Issue
2018-09-05 12:20 marvintm Assigned To => Retail
2018-09-05 12:20 marvintm Triggers an Emergency Pack => No
2018-09-05 13:38 ngarcia Issue Monitored: ngarcia
2018-09-05 13:45 rafaroda Issue Monitored: rafaroda
2018-09-05 13:46 rafaroda Relationship added related to 0038862
2018-09-05 13:46 rafaroda Relationship added related to 0039219
2018-09-22 12:22 hgbot Checkin
2018-09-22 12:22 hgbot Note Added: 0106945
2018-09-22 12:22 hgbot Status new => resolved
2018-09-22 12:22 hgbot Resolution open => fixed
2018-09-22 12:22 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.certification.france/rev/a7ea20a0029d388fec5512a62311c76fe5cea1f3 [^]
2018-09-24 11:44 hgbot Checkin
2018-09-24 11:44 hgbot Note Added: 0106955
2018-09-24 11:44 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.certification.france/rev/a7ea20a0029d388fec5512a62311c76fe5cea1f3 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.certification.france/rev/3502cba26576595e7c7b18416bfc89a86979f334 [^]
2018-09-24 11:44 hgbot Checkin
2018-09-24 11:44 hgbot Note Added: 0106956
2018-09-24 11:44 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.certification.france/rev/3502cba26576595e7c7b18416bfc89a86979f334 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.certification.france.testing/rev/8eb582e6320f09f83b3edf62e3535dc7c94a31ae [^]
2018-09-24 12:56 marvintm Assigned To Retail => migueldejuana
2018-09-25 11:25 hgbot Checkin
2018-09-25 11:25 hgbot Note Added: 0106998
2018-09-25 11:25 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.certification.france.testing/rev/8eb582e6320f09f83b3edf62e3535dc7c94a31ae [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/6910f55260f8b13d080357ae85a428873df444aa [^]
2018-09-25 11:25 hgbot Checkin
2018-09-25 11:25 hgbot Note Added: 0107000
2018-09-25 11:25 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/6910f55260f8b13d080357ae85a428873df444aa [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c8bfb5a83a52b30c5bf5e0d1496f83f48b97a5f5 [^]
2018-09-25 11:25 hgbot Checkin
2018-09-25 11:25 hgbot Note Added: 0107001
2018-09-25 11:25 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c8bfb5a83a52b30c5bf5e0d1496f83f48b97a5f5 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/937b88dcb5907541cfb6842ab982750408c486ea [^]
2018-09-25 11:25 hgbot Checkin
2018-09-25 11:25 hgbot Note Added: 0107002
2018-09-25 11:25 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/937b88dcb5907541cfb6842ab982750408c486ea [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/21b7af32d1dd83a9371ee2974641e61f61333cca [^]
2018-09-25 11:25 hgbot Checkin
2018-09-25 11:25 hgbot Note Added: 0107003
2018-09-25 11:25 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/21b7af32d1dd83a9371ee2974641e61f61333cca [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/bbd60d8feedd6d60e12885322de6f91eac948e9d [^]
2018-09-25 11:25 hgbot Checkin
2018-09-25 11:25 hgbot Note Added: 0107004
2018-09-25 11:25 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/bbd60d8feedd6d60e12885322de6f91eac948e9d [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/a8ea661c6af12b28c46df3a464c0396ac5b4e41a [^]
2018-09-25 11:25 hgbot Checkin
2018-09-25 11:25 hgbot Note Added: 0107005
2018-09-25 11:25 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/a8ea661c6af12b28c46df3a464c0396ac5b4e41a [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/57d2a0c4bc8515edcf7470a121683274de8402f3 [^]
2018-09-25 11:25 hgbot Checkin
2018-09-25 11:25 hgbot Note Added: 0107006
2018-09-25 11:25 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/57d2a0c4bc8515edcf7470a121683274de8402f3 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/1c4983d51309bddac5c9d47917e65e49fad9051d [^]
2018-09-27 10:38 hgbot Checkin
2018-09-27 10:38 hgbot Note Added: 0107045
2018-09-27 10:38 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/1c4983d51309bddac5c9d47917e65e49fad9051d [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.stockvalidation/rev/dcd5184888e81af6d66d9c76e656c0642c37d1d2 [^]
2018-09-28 13:18 marvintm Note Added: 0107071
2018-09-28 13:18 marvintm Status resolved => new
2018-09-28 13:18 marvintm Resolution fixed => open
2018-09-28 14:09 hgbot Checkin
2018-09-28 14:09 hgbot Note Added: 0107073
2018-09-28 14:09 hgbot Status new => resolved
2018-09-28 14:09 hgbot Resolution open => fixed
2018-09-28 14:09 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.stockvalidation/rev/dcd5184888e81af6d66d9c76e656c0642c37d1d2 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/cfb6a93c38e8961d10cd7364d1337287a255a182 [^]
2018-09-28 14:47 marvintm Review Assigned To => marvintm
2018-09-28 14:47 marvintm Status resolved => closed
2018-09-28 14:47 marvintm Fixed in Version => RR18Q4
2018-10-03 09:26 migueldejuana Status closed => new
2018-10-03 09:26 migueldejuana Resolution fixed => open
2018-10-03 09:26 migueldejuana Fixed in Version RR18Q4 =>
2018-10-03 09:26 migueldejuana Status new => scheduled
2018-10-03 09:26 migueldejuana Status scheduled => resolved
2018-10-03 09:26 migueldejuana Resolution open => fixed
2018-10-03 09:26 migueldejuana Status resolved => closed
2018-10-18 10:30 migueldejuana File Added: mobileCore17q2.diff
2018-10-18 10:30 migueldejuana File Added: mobileCore17Q33.diff
2018-10-18 10:30 migueldejuana File Added: posterminal17q2.diff
2018-10-18 10:30 migueldejuana File Added: posterminal17Q33.diff
2018-10-18 10:31 migueldejuana File Added: posterminal18Q24.diff
2018-10-18 10:31 migueldejuana File Added: mobileCore18Q24.diff
2018-10-18 16:37 migueldejuana Status closed => new
2018-10-18 16:37 migueldejuana Resolution fixed => open
2018-10-18 16:37 migueldejuana Status new => scheduled
2018-10-18 16:37 migueldejuana Status scheduled => resolved
2018-10-18 16:37 migueldejuana Resolution open => fixed
2018-10-18 16:38 migueldejuana Status resolved => closed
2018-10-19 13:27 migueldejuana File Deleted: mobileCore18Q24.diff
2018-10-19 13:27 migueldejuana File Deleted: posterminal18Q24.diff
2019-06-11 10:01 migueldejuana Relationship added related to 0041067


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker