Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0016765Openbravo ERPA. Platformpublic2011-04-12 13:142011-08-31 12:41
mirurita 
adrianromero 
normalmajoralways
closedfixed 
20Community Appliance
 
3.0MP33.0MP3 
User Interface Selector
No
0016765: Selector in manual window: not possible to remove the selected value and fire onchange event
If you create a selector (using user interface selector module) in a manual window is not possible to remove a selected element (or value).
In this case if the selector is a optional field after selecting a value is not possible to leave empty again.

The event should not be launched until the field is empty. With the proposed solution if the user removes one character it launched the onchange event as any value has been selected.

From a performance perspective (with APR) depending on the filter a grid dynamically creating, imagine each time a character is removed all the grid is loading again.
1) Go to Financial Account || Transactions tab
2) Click on Add Transaction button
3) Click on Add Payment button
4) Enter a value for the business partner selector
5) Try to remove it
See attached diff
No tags attached.
related to defect 00180563.0MP3 closed mirurita Business partner selector in Add Payment window fires the reload of the results in every change 
diff issue16765.diff (1,997) 2011-04-13 16:26
https://issues.openbravo.com/file_download.php?file_id=3872&type=bug
Issue History
2011-04-12 13:14miruritaNew Issue
2011-04-12 13:14miruritaAssigned To => iperdomo
2011-04-12 13:14miruritaModules => User Interface Selector
2011-04-13 16:25miruritaDescription Updatedbug_revision_view_page.php?rev_id=1842#r1842
2011-04-13 16:25miruritaProposed Solution updated
2011-04-13 16:26miruritaFile Added: issue16765.diff
2011-04-15 15:13miruritaNote Added: 0035993
2011-04-15 15:14miruritaNote Edited: 0035993bug_revision_view_page.php?bugnote_id=0035993#r1853
2011-05-02 10:40alostaleStatusnew => scheduled
2011-05-06 18:16dmitry_mezentsevNote Added: 0036529
2011-05-06 18:16dmitry_mezentsevTarget Version3.0RC7 => 3.0MP0
2011-05-17 09:15iperdomoPriorityhigh => normal
2011-06-02 10:53dmitry_mezentsevTarget Version3.0MP0 => 3.0MP1
2011-06-22 19:57dmitry_mezentsevTarget Version3.0MP1 => 3.0MP2
2011-07-13 12:52iperdomoNote Added: 0039035
2011-07-13 12:52iperdomoStatusscheduled => feedback
2011-07-19 11:38iperdomoStatusfeedback => scheduled
2011-07-19 11:38iperdomoAssigned Toiperdomo => adrianromero
2011-07-19 11:38iperdomofix_in_branch => pi
2011-07-21 17:20adrianromeroNote Added: 0039300
2011-07-21 17:21adrianromeroNote Edited: 0039300bug_revision_view_page.php?bugnote_id=0039300#r2484
2011-07-21 17:21adrianromeroTarget Version3.0MP2 => 3.0MP3
2011-07-21 17:21adrianromerofix_in_branchpi =>
2011-07-21 17:28adrianromeroIssue cloned0018056
2011-07-21 17:28adrianromeroRelationship addedrelated to 0018056
2011-07-21 17:30adrianromeroNote Added: 0039301
2011-08-23 14:29hgbotCheckin
2011-08-23 14:29hgbotNote Added: 0040443
2011-08-23 14:29hgbotStatusscheduled => resolved
2011-08-23 14:29hgbotResolutionopen => fixed
2011-08-23 14:29hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/d61db4a5e84b6459ca4b389c181a4fb84a81ee0e [^]
2011-08-23 14:33adrianromeroNote Added: 0040446
2011-08-24 01:08hudsonbotCheckin
2011-08-24 01:08hudsonbotNote Added: 0040466
2011-08-31 12:41jonalegriaesarteNote Added: 0040617
2011-08-31 12:41jonalegriaesarteStatusresolved => closed
2011-08-31 12:41jonalegriaesarteFixed in Version => 3.0MP3

Notes
(0035993)
mirurita   
2011-04-15 15:13   
(edited on: 2011-04-15 15:14)
Should be solved also in userinterface.selector module for 2.50.

(0036529)
dmitry_mezentsev   
2011-05-06 18:16   
Moving to MP0 now. Please rise the flag in case it is critical not to do it.
(0039035)
iperdomo   
2011-07-13 12:52   
The issue with APR was solved in a different way. Is this issue is still valid?
(0039300)
adrianromero   
2011-07-21 17:20   
(edited on: 2011-07-21 17:21)
The patch attached is valid and using it the event callOut and onValueChange are invoked in every change of the selector.

But there is an unwanted side effect in this case when applied this patch that is that callOut and onValueChange are invoked in every change, even when the user is typing in the selector field making the window to invoke the server in every key event.

To fix this side effect it must be modified the window overwriting the method onValueChange of the selector instead of the method callOut because onValueChange has all the information of the value changed.

In the body of the event onValueChange, to identify whether there is a value selected or the field is empty there is needed to use the following expressions:

* this.selectorField.getValue() to get the text typed in the selector where this is the javascript selector object.
* selectedObj that is the parameter of the event onValueChange, to know whether a value has been selected or not.

(0039301)
adrianromero   
2011-07-21 17:30   
This issue must be fixed in coordination with the related issue 18056
(0040443)
hgbot   
2011-08-23 14:29   
Repository: erp/devel/pi
Changeset: d61db4a5e84b6459ca4b389c181a4fb84a81ee0e
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Thu Aug 18 13:04:35 2011 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/d61db4a5e84b6459ca4b389c181a4fb84a81ee0e [^]

Fixes issue 0016765: Selector in manual window: not possible to remove the selected value and fire onchange event
Now the event callout is fired in every change of the selector

---
M modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-widget.js
---
(0040446)
adrianromero   
2011-08-23 14:33   
* Testing the issue

Kindly follow the steps to test and verify that now when the business partner value is removed the list is updated.

* Other areas affected

This must be verified in other selectors of the same kind in other manual windows because it has been modified the general behavior of the selector when the hook functions are invoked.
(0040466)
hudsonbot   
2011-08-24 01:08   
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/ae0285ee1597 [^]

Maturity status: Test
(0040617)
jonalegriaesarte   
2011-08-31 12:41   
Verified