Openbravo Issue Tracking System - Retail Modules | |||||
| View Issue Details | |||||
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0036445 | Retail Modules | Web POS | public | 2017-07-07 11:37 | 2017-07-13 10:53 |
| Reporter | malsasua | ||||
| Assigned To | ranjith_qualiantech_com | ||||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Platform | OS | 5 | OS Version | ||
| Product Version | |||||
| Target Version | Fixed in Version | ||||
| Merge Request Status | |||||
| Review Assigned To | migueldejuana | ||||
| OBNetwork customer | OBPS | ||||
| Support ticket | 47437 | ||||
| Regression level | |||||
| Regression date | |||||
| Regression introduced in release | |||||
| Regression introduced by commit | |||||
| Triggers an Emergency Pack | No | ||||
| Summary | 0036445: many listeners are being created for change event in scrollable table when lines are not added in the last position | ||||
| Description | When orderlines are created and they are inserted not in the last position (because a customization)[attached], then the method _createComponentForModel of ScrollableComponent component is creating listeners for events change and updateview many times for lines which already have it. | ||||
| Steps To Reproduce | see attachment | ||||
| Proposed Solution | Option 1 (preferred) Test it carefully!! Create a static function. Maybe backbone will detect that your "on" is against a function which is already being used as a listener, so it will not create the listener this.func_checkAll = function (col) { //if the same collection is used by different components and one of them has been destroyed, the event is ignored if (this.destroyed) { if (this.collection) { this.collection.off('checkAll', this.func_checkAll); } return true; } this.collection.each(function (model) { model.trigger('check'); }); }; this.collection.on('checkAll', this.func_checkAll, this); Option 2 When creating listerners, first check if a model is already connected to a listener function. If it is, remove the listener (off) and then create again the listener (on). example: if (!this.func_focus) { this.func_focus = function () { //stuff }; } this.task.off('focusCalculated', this.func_focus); this.task.on('focusCalculated', this.func_focus); //end workaround | ||||
| Additional Information | |||||
| Tags | No tags attached. | ||||
| Relationships | |||||
| Attached Files | https://issues.openbravo.com/file_download.php?file_id=10898&type=bug | ||||
| Issue History | |||||
| Date Modified | Username | Field | Change | ||
| 2017-07-07 11:37 | malsasua | New Issue | |||
| 2017-07-07 11:37 | malsasua | Assigned To | => Retail | ||
| 2017-07-07 11:37 | malsasua | File Added: hookPerformanceProblem.txt | |||
| 2017-07-07 11:37 | malsasua | OBNetwork customer | => Yes | ||
| 2017-07-07 11:37 | malsasua | Support ticket | => 47437 | ||
| 2017-07-07 11:37 | malsasua | Resolution time | => 1501192800 | ||
| 2017-07-07 11:37 | malsasua | Triggers an Emergency Pack | => No | ||
| 2017-07-07 11:42 | Practics | Issue Monitored: Practics | |||
| 2017-07-10 15:49 | jmonfort | Issue Monitored: jmonfort | |||
| 2017-07-12 14:17 | ranjith_qualiantech_com | Assigned To | Retail => ranjith_qualiantech_com | ||
| 2017-07-12 14:17 | ranjith_qualiantech_com | Status | new => scheduled | ||
| 2017-07-13 08:13 | hgbot | Checkin | |||
| 2017-07-13 08:13 | hgbot | Note Added: 0098055 | |||
| 2017-07-13 08:13 | hgbot | Status | scheduled => resolved | ||
| 2017-07-13 08:13 | hgbot | Resolution | open => fixed | ||
| 2017-07-13 08:13 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/cb08b24b56b58ef9c9998840d4e302041f31b42a [^] | ||
| 2017-07-13 10:53 | migueldejuana | Review Assigned To | => migueldejuana | ||
| 2017-07-13 10:53 | migueldejuana | Note Added: 0098061 | |||
| 2017-07-13 10:53 | migueldejuana | Status | resolved => closed | ||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||