Openbravo Issue Tracking System - Retail Modules |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0032443 | Retail Modules | Web POS | public | 2016-03-09 11:36 | 2016-06-20 16:55 |
|
Reporter | mtaal | |
Assigned To | Sandrahuguet | |
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | RR16Q3 | Fixed in Version | RR16Q3 | |
Merge Request Status | |
Review Assigned To | mtaal |
OBNetwork customer | No |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0032443: Prevent changing out-dated/stale data (ticket/BP) in webpos |
Description | With the current webpos version it is possible to load a ticket (layaway) in multiple terminals and change it in both, one change overwriting the other, or change it in the backoffice while it is already loaded in a webpos were it then get changed afterwards.
So it is possible that a ticket change is overwritten by ticket loaded earlier in webpos.
The same issue can arise with BP data. |
Steps To Reproduce | run OB Commerce
start 2 browsers
load the same layaway in 2 browsers
change the layaway in both and submit one after the other
only one of the changes is saved |
Proposed Solution | When sending a ticket/data to the server check if there has not already been a change in the data. If so then reject the transaction, throw an error with a nice user message.
To implement this:
- when loading data from the server include the updated timestamp
- then when changing this data and sending it back to the server send the original updated timestamp with it and check on the server if it hasn't changed since then
- if it has changed don't perform the transaction, instead throw an exception
Do this for tickets, BPs and BP addresses.
|
Additional Information | |
Tags | No tags attached. |
Relationships | related to | defect | 0034001 | | closed | Sandrahuguet | verify the updated date is not necessary in "prevent changing out-dated/stale data (ticket/BP)" feature | causes | defect | 0033511 | | closed | ranjith_qualiantech_com | Error When completing layaway from backend with payment method discount | causes | defect | 0034285 | | closed | ranjith_qualiantech_com | Customer can not be edited | causes | defect | 0034466 | | closed | ranjith_qualiantech_com | Layaway payments not created with time offset |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2016-03-09 11:36 | mtaal | New Issue | |
2016-03-09 11:36 | mtaal | Assigned To | => mtaal |
2016-03-09 11:36 | mtaal | OBNetwork customer | => No |
2016-03-09 11:36 | mtaal | Triggers an Emergency Pack | => No |
2016-03-09 11:36 | mtaal | Summary | Prevent changing out-dated/stale ticket in webpos => Prevent changing out-dated/stale data (ticket/BP) in webpos |
2016-03-09 11:36 | mtaal | Description Updated | bug_revision_view_page.php?rev_id=11393#r11393 |
2016-04-01 11:13 | mtaal | Note Added: 0085381 | |
2016-04-01 11:13 | mtaal | Assigned To | mtaal => Sandrahuguet |
2016-04-19 09:02 | Sandrahuguet | Status | new => scheduled |
2016-05-16 08:54 | hgbot | Checkin | |
2016-05-16 08:54 | hgbot | Note Added: 0086454 | |
2016-05-16 08:54 | hgbot | Status | scheduled => resolved |
2016-05-16 08:54 | hgbot | Resolution | open => fixed |
2016-05-16 08:54 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/65a71ebd583ae7511c94526bc7fcdfe0c892c7f8 [^] |
2016-05-16 08:57 | hgbot | Checkin | |
2016-05-16 08:57 | hgbot | Note Added: 0086455 | |
2016-05-16 08:57 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/65a71ebd583ae7511c94526bc7fcdfe0c892c7f8 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/c396d14324f8ca0baa52b18ba15c0033a6ef1f09 [^] |
2016-05-16 08:58 | Sandrahuguet | Review Assigned To | => mtaal |
2016-05-16 09:12 | hgbot | Checkin | |
2016-05-16 09:12 | hgbot | Note Added: 0086456 | |
2016-05-16 11:55 | hgbot | Checkin | |
2016-05-16 11:55 | hgbot | Note Added: 0086459 | |
2016-06-01 10:27 | dmitry_mezentsev | Note Added: 0086875 | |
2016-06-06 17:15 | mtaal | Note Added: 0087040 | |
2016-06-06 17:15 | mtaal | Status | resolved => new |
2016-06-06 17:15 | mtaal | Resolution | fixed => open |
2016-06-13 08:54 | hgbot | Checkin | |
2016-06-13 08:54 | hgbot | Note Added: 0087187 | |
2016-06-14 08:25 | hgbot | Checkin | |
2016-06-14 08:25 | hgbot | Note Added: 0087219 | |
2016-06-14 08:29 | Sandrahuguet | Status | new => scheduled |
2016-06-14 08:29 | Sandrahuguet | Status | scheduled => resolved |
2016-06-14 08:29 | Sandrahuguet | Resolution | open => fixed |
2016-06-14 10:42 | hgbot | Checkin | |
2016-06-14 10:42 | hgbot | Note Added: 0087237 | |
2016-06-20 16:55 | mtaal | Note Added: 0087683 | |
2016-06-20 16:55 | mtaal | Status | resolved => closed |
2016-06-20 16:55 | mtaal | Fixed in Version | => RR16Q3 |
2016-07-20 15:58 | ranjith_qualiantech_com | Relationship added | causes 0033511 |
2016-09-15 12:28 | Sandrahuguet | Relationship added | related to 0034001 |
2016-11-03 19:34 | dmitry_mezentsev | Relationship added | causes 0034285 |
2017-01-12 10:54 | ranjith_qualiantech_com | Relationship added | causes 0034466 |
Notes |
|
(0085381)
|
mtaal
|
2016-04-01 11:13
|
|
Note: also handle the case that the json contains an updated record, while the record has not yet been created in the database. So the stale data timestamp should be used to detect both the case that the record was updated by the json while it doesn't yet exist or that the record in the database is stale.
So these cases:
1) Detect insert has not happened (can only really happen in case of multi-server):
- webpos A creates a BP on store server
- webpos A updates BP on store server, update message is also send to central
- central server receives the update BP message but notices that the BP does not yet exist, it can throw an exception or only a warning and try again in the next cycle
2) Later update happened hasn't been synced yet
- webpos A loads BP at 11:01 am and updates on store server
- webpos A loads BP again and 11:03 am and updates on store server
- last update is also send to central server, there it is detected that the first update hasn't happened yet, the choice is to wait or to throw an exception
3) Stale date
- webpos A loads BP at 11:01 am
- webpos B loads BP at 11:02 am
- webpos B updates BP at 11:03 am
- webpos A updates BP at 11:04 am --> should give error as the BP has been updated in the mean time |
|
|
(0086454)
|
hgbot
|
2016-05-16 08:54
|
|
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 65a71ebd583ae7511c94526bc7fcdfe0c892c7f8
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Tue May 10 17:39:03 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/65a71ebd583ae7511c94526bc7fcdfe0c892c7f8 [^]
Fixed issue 32443 Prevent changing out-dated data in webpos
---
M src-db/database/sourcedata/AD_MESSAGE.xml
M src/org/openbravo/retail/posterminal/CustomerAddrLoader.java
M src/org/openbravo/retail/posterminal/CustomerLoader.java
M src/org/openbravo/retail/posterminal/OrderLoader.java
M src/org/openbravo/retail/posterminal/master/BPLocationProperties.java
M src/org/openbravo/retail/posterminal/master/BusinessPartnerProperties.java
M web/org.openbravo.retail.posterminal/js/data/datacustomeraddrsave.js
M web/org.openbravo.retail.posterminal/js/data/datacustomersave.js
M web/org.openbravo.retail.posterminal/js/model/bplocation.js
M web/org.openbravo.retail.posterminal/js/model/businesspartner.js
M web/org.openbravo.retail.posterminal/js/model/order.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/subwindows/customeraddress/customeraddrdetailview.js
---
|
|
|
(0086455)
|
hgbot
|
2016-05-16 08:57
|
|
|
|
(0086456)
|
hgbot
|
2016-05-16 09:12
|
|
Repository: tools/automation/pi-mobile
Changeset: 14515ed225995c6321a8a7765867b2ff985828ef
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Tue May 10 17:43:19 2016 +0200
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/14515ed225995c6321a8a7765867b2ff985828ef [^]
related to issue 32443 Prevent changing out-dated data in webpos
---
M src-test/org/openbravo/test/mobile/common/selenium/utils/OBDate.java
M src-test/org/openbravo/test/mobile/retail/pack/webservice/tests/orderloader/RetailOrderLoaderTest.java
M src-test/org/openbravo/test/mobile/retail/pack/webservice/tests/orderloader/message-order-paypartial1-1.json
M src-test/org/openbravo/test/mobile/retail/pack/webservice/tests/orderloader/message-order-paypartial2-1.json
M src-test/org/openbravo/test/mobile/retail/pack/webservice/tests/orderloader/message-order-ship-1.json
---
|
|
|
(0086459)
|
hgbot
|
2016-05-16 11:55
|
|
|
|
|
|
|
(0087040)
|
mtaal
|
2016-06-06 17:15
|
|
Hi,
It worked but the logging of the customer/customer addr stale update didn't happen. The result of the call to messageBD has to be given to log.warn method.
In both CustomerLoader and CustomerAddrLoader.
Also, can you add a testcase which does the following:
- set the synchronized mode preference
- open a layaway
- change the layaway in the database directly
- add a payment to the layaway
- press done
--> a error message should pop up
- at the end of the test the synchronized pref needs to be removed |
|
|
(0087187)
|
hgbot
|
2016-06-13 08:54
|
|
|
|
(0087219)
|
hgbot
|
2016-06-14 08:25
|
|
Repository: tools/automation/pi-mobile
Changeset: ba885cc69793eae32e4c45f923b5e251ae7c9d3a
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Tue Jun 14 08:17:18 2016 +0200
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/ba885cc69793eae32e4c45f923b5e251ae7c9d3a [^]
related to issue 32443 added I32443_LayawayStaleData test
---
M src-test/org/openbravo/test/mobile/common/selenium/utils/AllowedErrorsHelper.java
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/layaway/I32443_LayawayStaleData.java
---
|
|
|
(0087237)
|
hgbot
|
2016-06-14 10:42
|
|
|
|
(0087683)
|
mtaal
|
2016-06-20 16:55
|
|
|