Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0020043Openbravo ERPB. User interfacepublic2012-03-15 20:412012-09-16 19:59
dbaz 
dbaz 
highminoralways
closedfixed 
5
 
3.0MP12 
guilleaer
Core
No
0020043: [SC Upgrade] Quick create/launch doesn't open a tab when selecting a value after upgrade to SC 8.3d 2012-03-12 (or later)
Quick create/launch doesn't open a tab when selecting a value after upgrade to SC 8.3d 2012-03-12 (or later)
With an instance upgraded to Smartclient 8.3d 2012-03-12 (or later)
Login into the application.
Open quick create or quick launch and select any value in the combo. Nothing happens.
The problem is that after the upgrade is not possible to select a value of a combo that uses "optionDataSource"

The "pickValue" [PickList.js] is in charge of "draw" the desired value in the combo. This "pickValue" has a "value" argument to determine the selected value

"pickValue" is called from "itemClick" [PickList.js] which determine the "value" to pass to "pickValue" using "formItem.getValueFieldName()"

"getValueFieldName" [FormItem.js] in the OLD SmartClient version is like:
    getValueFieldName : function () {
        if (this.valueField) return this.valueField;
        
        if (this.form.dataSource && this.foreignKey)
            return isc.DS.getForeignFieldName(this, this.form.dataSource);

        var fieldName = this.getFieldName(),
            ods = this.getOptionDataSource();
        if (ods && ods.getField(fieldName) == null) {
            // if we have an optionDataSource but our valueField isn't in it at all, use the
            // DataSource's titleField
            fieldName = ods.getTitleField();
        }
        
        return fieldName || "name";
    },
and in the new version is like:
    getValueFieldName : function () {
        if (this.valueField) return this.valueField;
        
        if (this.form.dataSource && this.foreignKey)
            return isc.DS.getForeignFieldName(this, this.form.dataSource);

        var fieldName = this.getFieldName();
        
        return fieldName || "name";
    },

As you can see in the old implementation looks if there is an optionDataSource to extract the fieldName from there, but in the new version it just returns the plain fieldName of the combo (so, the name of the combo item, and not the name of the selected item inside the combo drop down)

Solution: inside "ob-quick-launch.js" add a customized "getValueFieldName" function that search inside the "optionDataSource" for the desired name

UPDATED: Better Solution: Add the "valueField" inside the definition. With this fix, there is no need to overide anything, since "getValueFieldName" the first thing it does is check this "valueField" and if exists, it returns it
No tags attached.
Issue History
2012-03-15 20:41dbazNew Issue
2012-03-15 20:41dbazAssigned To => dbaz
2012-03-15 20:41dbazModules => Core
2012-03-15 20:51dbazNote Added: 0046481
2012-03-16 13:23dbazProposed Solution updated
2012-03-16 13:25dbazNote Added: 0046514
2012-03-16 17:50dbazNote Edited: 0046514bug_revision_view_page.php?bugnote_id=0046514#r3278
2012-05-02 21:59hgbotCheckin
2012-05-02 21:59hgbotNote Added: 0048255
2012-05-02 21:59hgbotStatusnew => resolved
2012-05-02 21:59hgbotResolutionopen => fixed
2012-05-02 21:59hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/869c1d792a240e57fcaa3dcbf0c3953af0e991f5 [^]
2012-05-02 22:00hgbotCheckin
2012-05-02 22:00hgbotNote Added: 0048256
2012-05-02 22:00hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/869c1d792a240e57fcaa3dcbf0c3953af0e991f5 [^] => http://code.openbravo.com/erp/devel/pi/rev/8db7c53ab76b0b5c31abf0ec01b87d7effa4d2a1 [^]
2012-05-02 22:00hgbotCheckin
2012-05-02 22:00hgbotNote Added: 0048258
2012-05-02 22:00hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/8db7c53ab76b0b5c31abf0ec01b87d7effa4d2a1 [^] => http://code.openbravo.com/erp/devel/pi/rev/a6bf2830251111c427dcbc58b26ba5295abe0d9a [^]
2012-05-21 17:36guilleaerNote Added: 0048819
2012-05-21 17:36guilleaerStatusresolved => closed
2012-05-21 17:36guilleaerFixed in Version => pi
2012-05-25 12:07hudsonbotCheckin
2012-05-25 12:07hudsonbotNote Added: 0048949
2012-05-25 12:07hudsonbotCheckin
2012-05-25 12:07hudsonbotNote Added: 0048950
2012-05-25 12:07hudsonbotCheckin
2012-05-25 12:07hudsonbotNote Added: 0048952
2012-05-25 18:00guilleaerAssigned Todbaz => guilleaer
2012-05-25 18:00guilleaerNote Added: 0049249
2012-05-25 18:00guilleaerStatusclosed => new
2012-05-25 18:00guilleaerResolutionfixed => open
2012-05-25 18:00guilleaerFixed in Versionpi =>
2012-05-25 18:00guilleaerStatusnew => scheduled
2012-05-25 18:00guilleaerNote Added: 0049250
2012-05-25 18:00guilleaerfix_in_branch => pi
2012-05-25 18:01guilleaerNote Added: 0049251
2012-05-25 18:01guilleaerStatusscheduled => resolved
2012-05-25 18:01guilleaerFixed in Version => 3.0MP12
2012-05-25 18:01guilleaerResolutionopen => fixed
2012-05-25 18:01guilleaerNote Added: 0049252
2012-05-25 18:01guilleaerStatusresolved => closed
2012-09-16 19:59guilleaerAssigned Toguilleaer => dbaz
2012-09-16 19:59guilleaerStatusclosed => new
2012-09-16 19:59guilleaerResolutionfixed => open
2012-09-16 19:59guilleaerFixed in Version3.0MP12 =>
2012-09-16 19:59guilleaerStatusnew => scheduled
2012-09-16 19:59guilleaerStatusscheduled => resolved
2012-09-16 19:59guilleaerResolutionopen => fixed
2012-09-16 19:59guilleaerClosed by => guilleaer
2012-09-16 19:59guilleaerStatusresolved => closed

Notes
(0046481)
dbaz   
2012-03-15 20:51   
Resolved, by the moment, in branch pi-rtl

https://code.openbravo.com/erp/devel/pi-rtl/rev/869c1d792a24 [^]

The code-review can be already done, but the issue closure once pi-rtl be merged with pi (estimated by MP12)
(0046514)
dbaz   
2012-03-16 13:25   
(edited on: 2012-03-16 17:50)
Applied the proper solution, by the moment, in brach pi-rtl

https://code.openbravo.com/erp/devel/pi-rtl/rev/8db7c53ab76b [^]
https://code.openbravo.com/erp/devel/pi-rtl/rev/a6bf28302511 [^]

The code-review can be already done, but the issue closure once pi-rtl be merged with pi (estimated by MP12)

(0048255)
hgbot   
2012-05-02 21:59   
Repository: erp/devel/pi
Changeset: 869c1d792a240e57fcaa3dcbf0c3953af0e991f5
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Thu Mar 15 20:50:18 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/869c1d792a240e57fcaa3dcbf0c3953af0e991f5 [^]

Fixed issue 20043: 'Quick new/create' works again after upgrading to SC 8.3

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/navbar/ob-quick-launch.js
---
(0048256)
hgbot   
2012-05-02 22:00   
Repository: erp/devel/pi
Changeset: 8db7c53ab76b0b5c31abf0ec01b87d7effa4d2a1
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Fri Mar 16 13:24:04 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/8db7c53ab76b0b5c31abf0ec01b87d7effa4d2a1 [^]

Fixed issue 20043: 'Quick new/create' works again after upgrading to SC 8.3

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/navbar/ob-quick-launch.js
---
(0048258)
hgbot   
2012-05-02 22:00   
Repository: erp/devel/pi
Changeset: a6bf2830251111c427dcbc58b26ba5295abe0d9a
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Fri Mar 16 17:49:49 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/a6bf2830251111c427dcbc58b26ba5295abe0d9a [^]

Fixed issue 20043: 'Quick new/create' works again after upgrading to SC 8.3 - mini-change

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/navbar/ob-quick-launch.js
---
(0048819)
guilleaer   
2012-05-21 17:36   
verified in pi@87340d8f38a3
(0048949)
hudsonbot   
2012-05-25 12:07   
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/5401e185a8b0 [^]

Maturity status: Test
(0048950)
hudsonbot   
2012-05-25 12:07   
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/5401e185a8b0 [^]

Maturity status: Test
(0048952)
hudsonbot   
2012-05-25 12:07   
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/5401e185a8b0 [^]

Maturity status: Test
(0049249)
guilleaer   
2012-05-25 18:00   
Changing Fixed in Version to 3.0MP12
(0049250)
guilleaer   
2012-05-25 18:00   
Changing Fixed in Version to 3.0MP12
(0049251)
guilleaer   
2012-05-25 18:01   
Changing Fixed in Version to 3.0MP12
(0049252)
guilleaer   
2012-05-25 18:01   
Changing Fixed in Version to 3.0MP12