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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0037728
TypeCategorySeverityReproducibilityDate SubmittedLast Update
design defect[Retail Modules] Web POSmajorhave not tried2018-01-25 13:452018-03-28 00:41
ReportermarvintmView Statuspublic 
Assigned Torqueralta 
PrioritynormalResolutionopenFixed in Version
StatusnewFix in branchFixed in SCM revision6873765f8764
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0037728: Concurrent modification of business partners and business partner addresses is not correctly handled

DescriptionCurrently concurrent modification of business partners is not properly handled in the Web POS, because no locking mechanism is used. Optimistic locking should be used similarly to how it is currently handled in the layaways flow.
Steps To Reproduce.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0102254)
hgbot (developer)
2018-02-07 15:19

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 9565ddc5afda196009d6aa0ae47e97059252a3f7
Author: Alejandro <alekosmp86 <at> gmail.com>
Date: Wed Jan 31 09:38:08 2018 -0500
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/9565ddc5afda196009d6aa0ae47e97059252a3f7 [^]

Fixes issue 37728: Concurrent modification of Customer's data is now properly handled

---
M src/org/openbravo/retail/posterminal/CustomerAddrLoader.java
M src/org/openbravo/retail/posterminal/CustomerLoader.java
M web/org.openbravo.retail.posterminal/js/pointofsale/view/subwindows/customeraddress/customeraddrdetailview.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/subwindows/customeraddress/editcreatecustomeraddress.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/subwindows/customers/customerdetailview.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/subwindows/customers/editcreatecustomerform.js
---
(0102259)
hgbot (developer)
2018-02-07 16:54

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 616918a791520516982cd81dddd65c797834f963
Author: Alejandro <alekosmp86 <at> gmail.com>
Date: Wed Feb 07 10:53:18 2018 -0500
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/616918a791520516982cd81dddd65c797834f963 [^]

Related to issue 37728: Concurrent modification of Customer's data is now
properly handled

Backed out changeset: 9565ddc5afda

---
M src/org/openbravo/retail/posterminal/CustomerAddrLoader.java
M src/org/openbravo/retail/posterminal/CustomerLoader.java
M web/org.openbravo.retail.posterminal/js/pointofsale/view/subwindows/customeraddress/customeraddrdetailview.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/subwindows/customeraddress/editcreatecustomeraddress.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/subwindows/customers/customerdetailview.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/subwindows/customers/editcreatecustomerform.js
---
(0102451)
marvintm (manager)
2018-02-15 18:18

After further discussion, the main changes we need to do are:
- Ensure that in BusinessPartnerProperties.java the "loaded" property corresponds to the "updated" property of the business partner
- In CustomerLoader the changes done to throw the OutDatedDataChangeException make sense and should be included in the fix.
(0102493)
hgbot (developer)
2018-02-19 16:24

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 6873765f8764bfe3c1aca2e45149060db287c1fb
Author: Alejandro <alekosmp86 <at> gmail.com>
Date: Wed Jan 31 09:38:08 2018 -0500
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/6873765f8764bfe3c1aca2e45149060db287c1fb [^]

Fixes issue 37728: Concurrent modification of Customer's data is now properly handled

---
M src/org/openbravo/retail/posterminal/CustomerAddrLoader.java
M src/org/openbravo/retail/posterminal/CustomerLoader.java
M src/org/openbravo/retail/posterminal/master/BusinessPartnerProperties.java
M web/org.openbravo.retail.posterminal/js/pointofsale/view/subwindows/customeraddress/customeraddrdetailview.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/subwindows/customeraddress/editcreatecustomeraddress.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/subwindows/customers/customerdetailview.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/subwindows/customers/editcreatecustomerform.js
---
(0102876)
marvintm (manager)
2018-02-28 18:09

Still not working completely right. It is possible to modify concurrently the same customer from two different terminals:
- Connect to terminal VBS-1 from two different browsers.
- Open customer "Arturo Montero" from both browsers.
- Modify it in both browsers, and synchronise it.
No error will appear.

I think the main reason this is happening is that the "loaded" property is being modified in the client side, and its set to the current date. I believe this change was done to prevent two subsequent modifications in the same terminal from failing (because the second one would have an outdated loaded, and would fail with concurrent modification).

I understand then why this was done, but a small change is then needed: we should ensure that the "loaded" property which is synchronised to the backend is the previous one, and only then should the "loaded" property be modified in the client side. This would handle the case of two subsequent modifications in one terminal correctly, and would also handle correctly (in this case, fail) in case of two concurrent modifications in two different terminals.
(0103162)
hgbot (developer)
2018-03-12 14:14

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 764d263898f7558d6a9d64c705945220d4c4c61d
Author: Rafael Queralta Pozo <rqueralta <at> nauta.cu>
Date: Thu Mar 08 15:04:51 2018 -0500
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/764d263898f7558d6a9d64c705945220d4c4c61d [^]

Related to issue 37728: Concurrent modification of Customer's data is now
properly handled

---
M web/org.openbravo.retail.posterminal/js/pointofsale/view/subwindows/customers/components/sharedcomponents.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/subwindows/customers/customerdetailview.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/subwindows/customers/editcreatecustomerform.js
---
(0103590)
marvintm (manager)
2018-03-27 22:58

Current implementation doesn't completely solve all the cases, and has clear issues with the normal WebPOS synchronization mode, and offline mode. Changes will be reverted, and the solution will be rethought during the next release.
(0103591)
hgbot (developer)
2018-03-28 00:41

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 5348d4e8468ad80a86af03633b1ab88a370a89f6
Author: Rafael Queralta Pozo <rqueralta <at> nauta.cu>
Date: Tue Mar 27 18:15:39 2018 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/5348d4e8468ad80a86af03633b1ab88a370a89f6 [^]

Related to issue 37728: Concurrent modification of Customer's data is now
properly handled

 - Backed out changeset: 764d263898f7
 - Backed out changeset: 6873765f8764
 - Backed out changeset: 616918a79152
 - Backed out changeset: 9565ddc5afda

---
M src/org/openbravo/retail/posterminal/CustomerAddrLoader.java
M src/org/openbravo/retail/posterminal/CustomerLoader.java
M src/org/openbravo/retail/posterminal/master/BusinessPartnerProperties.java
M web/org.openbravo.retail.posterminal/js/pointofsale/view/subwindows/customeraddress/customeraddrdetailview.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/subwindows/customeraddress/editcreatecustomeraddress.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/subwindows/customers/components/sharedcomponents.js
---

- Issue History
Date Modified Username Field Change
2018-01-25 13:45 marvintm New Issue
2018-01-25 13:45 marvintm Assigned To => Retail
2018-01-25 13:45 marvintm Triggers an Emergency Pack => No
2018-01-25 14:01 marvintm Summary Concurrent modification of business partners is not correctly handled => Concurrent modification of business partners and business partner addresses is not correctly handled
2018-02-07 15:19 hgbot Checkin
2018-02-07 15:19 hgbot Note Added: 0102254
2018-02-07 15:19 hgbot Status new => resolved
2018-02-07 15:19 hgbot Resolution open => fixed
2018-02-07 15:19 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/9565ddc5afda196009d6aa0ae47e97059252a3f7 [^]
2018-02-07 16:54 hgbot Checkin
2018-02-07 16:54 hgbot Note Added: 0102259
2018-02-07 17:32 marvintm Assigned To Retail => alekosmp86
2018-02-15 18:18 marvintm Note Added: 0102451
2018-02-15 18:18 marvintm Status resolved => new
2018-02-15 18:18 marvintm Resolution fixed => open
2018-02-19 16:24 hgbot Checkin
2018-02-19 16:25 hgbot Note Added: 0102493
2018-02-19 16:25 hgbot Status new => resolved
2018-02-19 16:25 hgbot Resolution open => fixed
2018-02-19 16:25 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/9565ddc5afda196009d6aa0ae47e97059252a3f7 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/6873765f8764bfe3c1aca2e45149060db287c1fb [^]
2018-02-28 18:09 marvintm Note Added: 0102876
2018-02-28 18:09 marvintm Status resolved => new
2018-02-28 18:09 marvintm Resolution fixed => open
2018-03-12 14:14 hgbot Checkin
2018-03-12 14:14 hgbot Note Added: 0103162
2018-03-16 14:39 marvintm Assigned To alekosmp86 => rqueralta
2018-03-19 08:22 marvintm Status new => scheduled
2018-03-19 08:22 marvintm Status scheduled => resolved
2018-03-19 08:22 marvintm Fixed in Version => RR18Q2
2018-03-19 08:22 marvintm Resolution open => fixed
2018-03-27 22:58 marvintm Note Added: 0103590
2018-03-27 22:58 marvintm Status resolved => new
2018-03-27 22:58 marvintm Resolution fixed => open
2018-03-27 22:58 marvintm Fixed in Version RR18Q2 =>
2018-03-28 00:41 hgbot Checkin
2018-03-28 00:41 hgbot Note Added: 0103591


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker