Openbravo Issue Tracking System - Retail Modules
View Issue Details
0037589Retail ModulesWeb POSpublic2018-01-05 12:262018-01-31 12:27
guilleaer 
gorka_gil 
normalminorhave not tried
closedfixed 
5
 
RR18Q1.1RR18Q2 
guilleaer
No
0037589: Test I35741_VerifyRemoveLinesWithServices failling with throttle patch attached
The execution of test I35741 having applied before the throttle patch (issue 37416) has uncovered a real issue in web POS code.

This issue is easily reproducible increasing the time of the throttle from 500ms to 5000ms (small patch attached to the issue for mobile core to be applied on top of throttle patch) and increasing the time of the timeout (attached patch for posterminal)

Then follow the steps

why error happens?

when throttleUpdateViewFunction is executed (at the end of the throttle time) the Ui component is destroyed and recreated.

The piece of code inside the timeout is executed in a context which was destroyed. it creates the error.

This asynchrony generated by setTimeout is wrong.
1. Using search tab search for bed
2. add bed to the ticket
3. in less than 5seconds select the line and press the services button
4. wait 5 seconds until the error happens
Avoid set timeout or manage it properly
No tags attached.
blocks defect 0037416RR18Q1.1 closed gorka_gil Performance of scrollable table is not good 
diff diffToReproduceThrottleIssue.diff (537) 2018-01-05 12:26
https://issues.openbravo.com/file_download.php?file_id=11425&type=bug
diff diffToReproduce.diff (665) 2018-01-05 12:26
https://issues.openbravo.com/file_download.php?file_id=11426&type=bug
Issue History
2018-01-05 12:26guilleaerNew Issue
2018-01-05 12:26guilleaerAssigned To => Retail
2018-01-05 12:26guilleaerFile Added: diffToReproduceThrottleIssue.diff
2018-01-05 12:26guilleaerTriggers an Emergency Pack => No
2018-01-05 12:26guilleaerFile Added: diffToReproduce.diff
2018-01-05 12:27guilleaerRelationship addedblocks 0037416
2018-01-15 13:52hgbotCheckin
2018-01-15 13:52hgbotNote Added: 0101693
2018-01-15 13:52hgbotStatusnew => resolved
2018-01-15 13:52hgbotResolutionopen => fixed
2018-01-15 13:52hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/be81f7a23b98e51ef870a63cad4229881ce4e0b9 [^]
2018-01-15 17:09guilleaerReview Assigned To => guilleaer
2018-01-17 13:43gorka_gilNote Added: 0101753
2018-01-23 12:24guilleaerStatusresolved => closed
2018-01-23 12:24guilleaerFixed in Version => RR18Q2
2018-01-31 12:27gorka_gilAssigned ToRetail => gorka_gil

Notes
(0101693)
hgbot   
2018-01-15 13:52   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: be81f7a23b98e51ef870a63cad4229881ce4e0b9
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Mon Jan 15 13:51:19 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/be81f7a23b98e51ef870a63cad4229881ce4e0b9 [^]

Fixes issue 37589: remove setTimeout when clicking in services button, and add a return true so select line button is not executed

The button of services is inside the ticket line that is also a button,
and inside button executes before, so first open the services window and after the edit,
to change this order the services windows is opened with a setTimeout.

Now changed to only execute service button, and with a return avoid to execute the select line button,
so the setTimeout is no longer needed.

This change is needed for the throttle, since the timeout runs when the component is already destroyed and fail.

---
M web/org.openbravo.retail.posterminal/js/components/renderorderline.js
---
(0101753)
gorka_gil   
2018-01-17 13:43   
Repository: erp/pmods/org.openbravo.retail.complementary
Changeset: cfea544e8b55
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Wed Jan 17 12:23:54 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.complementary/rev/cfea544e8b55 [^]

Related to 37589: remove setTimeout when clicking in complementary button, and add a return true so select line button is not executed

The button of complementary is inside the ticket line that is also a button,
and inside button executes before, so first open the complementary window and after the edit,
to change this order the complementary window is opened with a setTimeout.

Now changed to only execute complementary button, and with a return avoid to execute the select line button,
so the setTimeout is no longer needed.

This change is needed for the throttle, since the timeout runs when the component is already destroyed and fail.

---
M web/org.openbravo.retail.complementary/js/hooks/hookRenderOrderLine.js
---