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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0052728
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Sessionsmajorrandom2023-06-13 11:112023-10-02 08:31
Reporterwilliam_vermerschView Statuspublic 
Assigned Toranjith_qualiantech_com 
PriorityhighResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSLinux 64 bitDatabasePostgreSQLJava version7.x
OS VersionOpenbravo Appliance 14.04Database version9.3.xAnt version1.9.x
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0052728: Duplicate opened sessions can be created when setting business date

DescriptionIt seems that it is possible to click multiple time on Done button when setting business date (high latency/load on the POS).

Adding some logs to maybe better understand the issue:

03-06-2023 08:50:22 retail.loginbusinessdate Process: setBusinessDate - finished - (575499C5FAA6A319F829B44E85019C41)
03-06-2023 08:50:22 retail.loginbusinessdate Process: setBusinessDate - started - (575499C5FAA6A319F829B44E85019C41)
03-06-2023 08:50:22 retail.loginbusinessdate | multiColumn - leftToolbar Clicked on 'icon' - (btnDone - icon)
03-06-2023 08:50:23 retail.loginbusinessdate [opentill][AvoidCountCashAndSendOpenTill] Send open till without UI; stackTrace: OB.OBPOSSession.CountCash.Model.AvoidCountCashAndSendOpenTill (https://weldom.cloud.openbravo.com/openbravo/web/js/gen/02f977056d0e0b41f05eaac8ac40e678.js:5827:350 [^])
03-06-2023 08:50:23 retail.loginbusinessdate Process: setBusinessDate - finished - (F7F1F043DB81D9A68CF7F7C89B406ED0)
03-06-2023 08:50:23 retail.loginbusinessdate Process: setBusinessDate - started - (F7F1F043DB81D9A68CF7F7C89B406ED0)
03-06-2023 08:50:23 retail.loginbusinessdate | multiColumn - leftToolbar Clicked on 'icon' - (btnDone - icon)
03-06-2023 08:50:25 retail.loginbusinessdate | dynamicConfirmationPopup Process: showLoading - finished - (04EA1F48AA14FEE451EFF7C5DD6477A6)

We can see that it was possible to click on the button 2 times before the popup was displayed.
Steps To ReproduceSince it seems to be related to high latency/load on the POS, the only way to reproduce it (on a local POS, not on a production environment), is to setTimeout the function starting the process.

In approvedRequest method of BusinessDateModel.js :

if (approved) {
        setTimeout(() => {
          var setBusinessDate,
            execution = OB.UTIL.ProcessController.start('setBusinessDate'),
            me = this;
...
}, 200);

-----

Connect to a POS (closed store)
Go to the set business date step
Input the business date
Click multiple time on the Done button (upper toolbar)

-----
You will have multiple sessions opened (check screenshot)
Proposed SolutionI suppose that in the tap method of the toolbar button, the first step should be to disable it, and enable it in a callback method.
TagsNo tags attached.
Attached Filespng file icon multiple_session.png [^] (31,475 bytes) 2023-06-13 11:11

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0051207RR20Q3.4 closedranjith_qualiantech_com Refreshing when setting the business date creates duplicated sessions 
related to defect 0045833 closedranjith_qualiantech_com It is possible to have two tills opened at the same time 
related to defect 0053362 closedRajesh_18 POS asked for doing a cash up in every login if the till is Closed in Backend and the cash up stuck in Data Import Entries 

-  Notes
(0151249)
hgbot (developer)
2023-06-16 07:27

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.sessions/-/merge_requests/87 [^]
(0151537)
hgbot (developer)
2023-06-23 08:22

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.sessions/-/merge_requests/87 [^]
(0151538)
hgbot (developer)
2023-06-23 08:22

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.sessions [^]
Changeset: 5c05f0f85b1ed262cb559cb4171510083423927a
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 23-06-2023 05:56:48
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.sessions/-/commit/5c05f0f85b1ed262cb559cb4171510083423927a [^]

Fixed ISSUE-52728: BusinessDate Done button should be disabled after clicking it

---
M web/org.openbravo.retail.sessions/js/components/BusinessDateModel.js
M web/org.openbravo.retail.sessions/js/components/BusinessDateWindowView.js
---
(0151623)
william_vermersch (developer)
2023-06-26 09:38

Hi Ranjith,

Thank you for the fix, unfortunately it is still doable do click before the popin is displayed.

I moved the callback to this location (BusinessDateModel.js) :

if (
          !OB.POS.modelterminal.get('terminal').poss_session &&
          OB.MobileApp.model.get('payments').length &&
          hasCashPaymentWithCountCash
        ) {
          OB.POS.navigate('retail.logincountcash');
          callback(true);
        } else {
          OB.OBPOSSession.CountCash.Model.AvoidCountCashAndSendOpenTill(() =>
            callback(true)
          );
        }

With this it seems to work, can you check if you can validate this, or propose a better option ?

Regards,
William
(0151861)
hgbot (developer)
2023-06-29 14:50

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.sessions/-/merge_requests/90 [^]
(0151928)
hgbot (developer)
2023-06-30 09:28

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.sessions [^]
Changeset: 6fe0d3cb6e79e1fb16aa8eec97c99b84b615305e
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 28-06-2023 16:48:09
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.sessions/-/commit/6fe0d3cb6e79e1fb16aa8eec97c99b84b615305e [^]

Fixed ISSUE-52728: BusinessDate Done button should be disabled until process completed

---
M web/org.openbravo.retail.sessions/js/components/BusinessDateModel.js
---
(0151929)
hgbot (developer)
2023-06-30 09:28

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.sessions/-/merge_requests/90 [^]

- Issue History
Date Modified Username Field Change
2023-06-13 11:11 william_vermersch New Issue
2023-06-13 11:11 william_vermersch Assigned To => Retail
2023-06-13 11:11 william_vermersch File Added: multiple_session.png
2023-06-13 11:11 william_vermersch Triggers an Emergency Pack => No
2023-06-13 11:19 william_vermersch Description Updated View Revisions
2023-06-13 18:36 ranjith_qualiantech_com Assigned To Retail => ranjith_qualiantech_com
2023-06-14 10:15 ranjith_qualiantech_com Status new => scheduled
2023-06-16 07:27 hgbot Note Added: 0151249
2023-06-23 08:22 hgbot Note Added: 0151537
2023-06-23 08:22 hgbot Resolution open => fixed
2023-06-23 08:22 hgbot Status scheduled => closed
2023-06-23 08:22 hgbot Note Added: 0151538
2023-06-26 09:38 william_vermersch Note Added: 0151623
2023-06-26 09:38 william_vermersch Status closed => new
2023-06-26 09:38 william_vermersch Resolution fixed => open
2023-06-27 06:41 ranjith_qualiantech_com Status new => scheduled
2023-06-29 14:50 hgbot Note Added: 0151861
2023-06-30 09:28 hgbot Resolution open => fixed
2023-06-30 09:28 hgbot Status scheduled => closed
2023-06-30 09:28 hgbot Note Added: 0151928
2023-06-30 09:28 hgbot Note Added: 0151929
2023-10-02 08:27 malsasua Relationship added related to 0053362
2023-10-02 08:28 malsasua Relationship added related to 0051207
2023-10-02 08:31 malsasua Relationship added related to 0045833


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker