Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0034200Openbravo ERPA. Platformpublic2016-10-13 14:502016-12-16 18:37
alostale 
alostale 
normalmajorhave not tried
closedfixed 
5
 
3.0PR17Q1 
caristu
Core
No
0034200: client side callouts are executed twice when picking a value in a selector drop down
When a selector field has associated a client side callout and a value for that field is picked from drop down list, the callout is executed twice.

Note when selecting the value from selector's popup the problem is not reproducible.
1. Define a client side callout for Sales Order > Lines > Product field. Ie. paste following code in browser's console:

  OB.OnChangeRegistry.register('187', 'product',
    function(item, view, form, grid) {
     console.log('product changed');
    }
  )

2. Create a Sales Order line
3. Open product drop down and select any value
  -> ERROR: in console 'product changed' appears twice, but it is expected to appear just once
Performance
duplicate of defect 0030808 closed platform Hook call twice in onChange function javascript 
related to defect 00228213.0MP21 closed AugustoMauch Callout not executed when writing the whole name in a selector 
? 34200.export (2,241) 2016-10-13 16:00
https://issues.openbravo.com/file_download.php?file_id=9909&type=bug
Issue History
2016-10-13 14:50alostaleNew Issue
2016-10-13 14:50alostaleAssigned To => platform
2016-10-13 14:50alostaleModules => Core
2016-10-13 14:50alostaleTriggers an Emergency Pack => No
2016-10-13 14:50alostaleRelationship addedrelated to 0022821
2016-10-13 14:51alostaleStatusnew => scheduled
2016-10-13 14:51alostaleAssigned Toplatform => alostale
2016-10-13 14:51alostaleReview Assigned To => caristu
2016-10-13 16:00alostaleFile Added: 34200.export
2016-10-14 07:29hgbotCheckin
2016-10-14 07:29hgbotNote Added: 0090560
2016-10-14 07:29hgbotStatusscheduled => resolved
2016-10-14 07:29hgbotResolutionopen => fixed
2016-10-14 07:29hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/69400c6e986bdcc84368f635553c8f8fe7fbdd5b [^]
2016-10-14 07:32alostaleTag Attached: Performance
2016-10-21 11:40caristuNote Added: 0090757
2016-10-21 11:40caristuStatusresolved => closed
2016-10-21 11:40caristuFixed in Version => 3.0PR17Q1
2016-10-31 17:42caristuRelationship addedduplicate of 0030808
2016-12-16 18:37hudsonbotCheckin
2016-12-16 18:37hudsonbotNote Added: 0092504

Notes
(0090560)
hgbot   
2016-10-14 07:29   
Repository: erp/devel/pi
Changeset: 69400c6e986bdcc84368f635553c8f8fe7fbdd5b
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Oct 13 15:59:17 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/69400c6e986bdcc84368f635553c8f8fe7fbdd5b [^]

fixed bug 34200: client side callouts executed twice

  When picking a value from a selector drop down, its associated client side
  callouts were executed twice.

  The problem was caused because in this situation fullIdentifierEntered flag
  was set to true and it causes the field blur event to trigger again the callouts.

  It has been prevented by adding a new valuePicked flag which is set to true
  when a value is picked from drop down, in this case fullIdentifierEntered is
  not set to true.

---
M modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
---
(0090757)
caristu   
2016-10-21 11:40   
Code reviewed + tested OK: client side callout is not executed twice anymore after selecting a value from the picking list.
(0092504)
hudsonbot   
2016-12-16 18:37   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/dc8bf00badd0 [^]
Maturity status: Test