Openbravo Issue Tracking System - POS2
View Issue Details
0051535POS2POSpublic2023-01-23 18:042023-02-20 08:31
javierRodriguez 
javierRodriguez 
normalmajorhave not tried
closedfixed 
5
 
23Q1 
No
0051535: Create a mechanism to detect that POS is working with a duplicated ticket id
After severals cases in production where the application is working with a brand new ticket which has a used id. This creates EWIs due to try to synchronise a ticket with duplicates ids.
In production, this problem appeared after an F5 (refresh) or after a delete ticket action.
This duplicated id should be checked:
- After an F5
- When a new ticket is set in Ticket state model

The application could have different scenarios when a ticket is set in the state. Ticket could be
- Processed tickets
- brand new tickets
- No-processed ticket which are in ticket list with products or payments on it.

It is necessary to take into account this different scenarios and do actions depending on them.
No tags attached.
blocks feature request 0051445 closed javierRodriguez Create a mechanism to detect that POS is working with a duplicated ticket id 
Issue History
2023-02-02 12:36guilleaerTypefeature request => backport
2023-02-02 12:36guilleaerTarget Version => 23Q1
2023-02-03 10:21hgbotNote Added: 0146239
2023-02-03 11:06hgbotNote Added: 0146254
2023-02-03 11:12hgbotResolutionopen => fixed
2023-02-03 11:12hgbotStatusscheduled => closed
2023-02-03 11:12hgbotFixed in Version => RR23Q1
2023-02-03 11:12hgbotNote Added: 0146255
2023-02-03 11:12hgbotNote Added: 0146256
2023-02-03 11:12hgbotNote Added: 0146257
2023-02-03 11:12hgbotNote Added: 0146258
2023-02-09 19:41javierRodriguezStatusclosed => new
2023-02-09 19:41javierRodriguezResolutionfixed => open
2023-02-09 19:41javierRodriguezFixed in VersionRR23Q1 =>
2023-02-10 11:37hgbotNote Added: 0146370
2023-02-10 11:51hgbotNote Added: 0146371
2023-02-10 11:51hgbotNote Added: 0146372
2023-02-10 13:35javierRodriguezStatusnew => scheduled
2023-02-10 13:35javierRodriguezStatusscheduled => resolved
2023-02-10 13:35javierRodriguezResolutionopen => fixed
2023-02-10 13:35javierRodriguezStatusresolved => closed
2023-02-17 13:40hgbotNote Added: 0146699
2023-02-17 13:40hgbotNote Added: 0146700
2023-02-17 13:59hgbotNote Added: 0146704
2023-02-20 08:30hgbotNote Added: 0146736
2023-02-20 08:30hgbotNote Added: 0146737
2023-02-20 08:30hgbotNote Added: 0146738
2023-02-20 08:31hgbotNote Added: 0146739
2023-02-20 08:31hgbotNote Added: 0146740
2023-02-20 08:31hgbotNote Added: 0146741

Notes
(0146239)
hgbot   
2023-02-03 10:21   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1057 [^]
(0146254)
hgbot   
2023-02-03 11:06   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1509 [^]
(0146255)
hgbot   
2023-02-03 11:12   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: ca8370ba81fac7825fded7e2f2f151ab4152a004
Author: Javier Rodriguez Regueiro <javier.rodriguez@openbravo.com>
Date: 03-02-2023 10:20:05
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/ca8370ba81fac7825fded7e2f2f151ab4152a004 [^]

Fixed ISSUE-51535: Check before load a local ticket if it is using a duplicated order id

- Extract paid receipt request to use in different places
- Create ticket utility function isOrderIdUsedInBackend to check duplicate order ids
- Create new action preparation in load local ticket action

---
M web-test/model/business-object/ticket-list/actions/LoadLocalTicket.test.js
M web/org.openbravo.retail.posterminal/app/model/business-object/ticket-list/actions/LoadLocalTicket.js
M web/org.openbravo.retail.posterminal/app/model/business-object/ticket/LoadTicketUtils.js
---
(0146256)
hgbot   
2023-02-03 11:12   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 2e55887051bccdb0923d159b7f6cf248c297feec
Author: Javier Rodriguez Regueiro <javier.rodriguez@openbravo.com>
Date: 03-02-2023 10:07:47
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/2e55887051bccdb0923d159b7f6cf248c297feec [^]

Related to ISSUE-51535: Check if the current ticket is using a duplicated id

---
M web-jspack/org.openbravo.pos2/src/authentication/loginInitActions.js
---
(0146257)
hgbot   
2023-02-03 11:12   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1057 [^]
(0146258)
hgbot   
2023-02-03 11:12   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1509 [^]
(0146370)
hgbot   
2023-02-10 11:37   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1063 [^]
(0146371)
hgbot   
2023-02-10 11:51   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 81b2741b0e3a57a2bd38e1a038757e832c4e94cc
Author: Javier Rodriguez Regueiro <javier.rodriguez@openbravo.com>
Date: 10-02-2023 11:34:43
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/81b2741b0e3a57a2bd38e1a038757e832c4e94cc [^]

Related to ISSUE-51535: Ensure the is data in the paid receipt response

---
M web/org.openbravo.retail.posterminal/app/model/business-object/ticket-list/actions/LoadLocalTicket.js
M web/org.openbravo.retail.posterminal/app/model/business-object/ticket/LoadTicketUtils.js
---
(0146372)
hgbot   
2023-02-10 11:51   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1063 [^]
(0146699)
hgbot   
2023-02-17 13:40   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1072 [^]
(0146700)
hgbot   
2023-02-17 13:40   
Merge request closed: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1072 [^]
(0146704)
hgbot   
2023-02-17 13:59   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1534 [^]
(0146736)
hgbot   
2023-02-20 08:30   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 8a0ca9756fd7d0bc9c8d6734b648e5212fe0305f
Author: Javier Rodriguez Regueiro <javier.rodriguez@openbravo.com>
Date: 17-02-2023 13:43:03
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/8a0ca9756fd7d0bc9c8d6734b648e5212fe0305f [^]

Related to ISSUE-51535: Send by payload the information to create a new ticket if it is needed

---
M web/org.openbravo.retail.posterminal/js/pointofsale/model/pointofsale-model.js
M web/org.openbravo.retail.posterminal/js/utils/ticketListUtils.js
---
(0146737)
hgbot   
2023-02-20 08:30   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 0f7f7a39ee5a7d20b3f0864a02e7f2d8982dc492
Author: Javier Rodriguez Regueiro <javier.rodriguez@openbravo.com>
Date: 17-02-2023 13:43:43
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/0f7f7a39ee5a7d20b3f0864a02e7f2d8982dc492 [^]

Related to ISSUE-51535: Fix how the ticket list is set depending on createNewTicket flow

---
M web/org.openbravo.retail.posterminal/app/model/business-object/ticket-list/actions/LoadLocalTicket.js
---
(0146738)
hgbot   
2023-02-20 08:30   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1072 [^]
(0146739)
hgbot   
2023-02-20 08:31   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 4c4f6fa658eafb2d26478c76e73e43231aadd4ca
Author: Javier Rodriguez Regueiro <javier.rodriguez@openbravo.com>
Date: 17-02-2023 13:56:42
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/4c4f6fa658eafb2d26478c76e73e43231aadd4ca [^]

Related to ISSUE-51535: Send by payload the information to create a new ticket if it is needed

---
M web-jspack/org.openbravo.pos2/src/authentication/loginInitActions.js
---
(0146740)
hgbot   
2023-02-20 08:31   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 9083752c39135e913970a64f056ca5d5c5490c65
Author: Javier Rodriguez Regueiro <javier.rodriguez@openbravo.com>
Date: 17-02-2023 13:57:30
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/9083752c39135e913970a64f056ca5d5c5490c65 [^]

Related to ISSUE-51535: Add prehook to prepare payload in LoadLocalTicket user action

---
M web-jspack/org.openbravo.pos2/src/model/ticket/__test__/LoadLocalTicket.test.js
M web-jspack/org.openbravo.pos2/src/model/ticket/user-actions/LoadLocalTicket.js
---
(0146741)
hgbot   
2023-02-20 08:31   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1534 [^]