Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0025987Openbravo ERPA. Platformpublic2014-03-13 17:052014-03-21 11:03
Sandrahuguet 
dbaz 
immediatemajorhave not tried
closedfixed 
20Community Appliance
 
3.0PR14Q23.0PR14Q2 
AugustoMauch
Core
Coding ( Testing )
2014-02-26
https://code.openbravo.com/erp/devel/pi/rev/20eb3426d990 [^]
No
0025987: Is impossible to edit a record in parameter tab in grid view
Is impossible to edit a record in parameter tab in process definition window in grid view because fails the validation in length field.
 
-As system administrator
-Go to Process Definition window, select a record and navigate to parameter tab
-Try to edit a record in grid view
-Notice that the validation in length fails
No tags attached.
related to feature request 0025574 closed dbaz Upgrade SmartClient 10.0d 
? issue25987.export (1,763) 2014-03-18 17:01
https://issues.openbravo.com/file_download.php?file_id=6752&type=bug
Issue History
2014-03-13 17:05SandrahuguetNew Issue
2014-03-13 17:05SandrahuguetAssigned To => AugustoMauch
2014-03-13 17:05SandrahuguetModules => Core
2014-03-13 17:05SandrahuguetTriggers an Emergency Pack => No
2014-03-13 17:07AugustoMauchRegression level => Coding ( Testing )
2014-03-13 17:07AugustoMauchPrioritynormal => immediate
2014-03-13 17:07AugustoMauchSeveritymajor => critical
2014-03-13 17:07AugustoMauchTarget Version => PR14Q2
2014-03-13 17:11alostaleRegression date => 2014-02-26
2014-03-13 17:11alostaleRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/20eb3426d990 [^]
2014-03-13 17:11alostaleSeveritycritical => major
2014-03-13 17:11alostaleDescription Updatedbug_revision_view_page.php?rev_id=5575#r5575
2014-03-13 17:11alostaleRelationship addedrelated to 0025574
2014-03-18 15:28AugustoMauchNote Added: 0065264
2014-03-18 16:43AugustoMauchNote Added: 0065269
2014-03-18 17:00AugustoMauchNote Added: 0065270
2014-03-18 17:01AugustoMauchStatusnew => scheduled
2014-03-18 17:01AugustoMauchfix_in_branch => pi
2014-03-18 17:01AugustoMauchFile Added: issue25987.export
2014-03-20 23:58dbazAssigned ToAugustoMauch => dbaz
2014-03-20 23:59dbazReview Assigned To => AugustoMauch
2014-03-20 23:59dbazfix_in_branchpi =>
2014-03-21 00:03hgbotCheckin
2014-03-21 00:03hgbotNote Added: 0065320
2014-03-21 00:03hgbotStatusscheduled => resolved
2014-03-21 00:03hgbotResolutionopen => fixed
2014-03-21 00:03hgbotFixed in SCM revision => http://code.openbravo.com/erp/mods/org.openbravo.userinterface.smartclient.dev/rev/d5a02ffc2091e81bd2be59742e9064bd18499075 [^]
2014-03-21 00:04hgbotCheckin
2014-03-21 00:04hgbotNote Added: 0065321
2014-03-21 00:04hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/mods/org.openbravo.userinterface.smartclient.dev/rev/d5a02ffc2091e81bd2be59742e9064bd18499075 [^] => http://code.openbravo.com/erp/devel/pi/rev/a3e91c862ccc02ddac136eba8d5b8170ce7afb8e [^]
2014-03-21 07:34hudsonbotCheckin
2014-03-21 07:34hudsonbotNote Added: 0065328
2014-03-21 11:03AugustoMauchNote Added: 0065351
2014-03-21 11:03AugustoMauchStatusresolved => closed
2014-03-21 11:03AugustoMauchFixed in Version => PR14Q2

Notes
(0065264)
AugustoMauch   
2014-03-18 15:28   
This issue has been caused by the smartclient upgrade. The problem is the following:
- Smartclient does not support properly having fields named 'length'. If the getField(fieldName) function is executed on a grid with fieldName = 'length', it does not return the field named length, but the actual length of the field array. This worked this way also in the previous smartclient version.
- The behavior of the getField function is now a problem because of a change in the validateRowValues function:

Before the upgrade:
...
        if (!shouldValidateCell) {
            var field = this.getField(fieldName),
                dataPath = field ? field.dataPath : null,
                undef;
            if (dataPath != null) {
                newValue = isc.Canvas._getFieldValue(this._trimDataPath(dataPath), null, newValues,
                                                                this, true);
                oldValue = isc.Canvas._getFieldValue(this._trimDataPath(dataPath), null, oldValues,
                                                                this, true);
                shouldValidateCell = (newValue !== undef || oldValue === undef);
            }
        } else {
            newValue = newValues[fieldName];
            oldValue = oldValues[fieldName];
        }
...

shouldValidateCell is true for the 'length' field, so the values were taken from newValues and oldValues, the faulty getField function was not called.

After the upgrade:
...
        var field = this.getField(fieldName),
            dataPath = field ? field.dataPath : null,
            undef;
        if (dataPath != null) {
            dataPath = this._trimDataPath(dataPath);
        } else {
            dataPath = field.name;
        }
        
        newValue = isc.Canvas._getFieldValue(dataPath, field, newValues,
                                                        this, true);
        oldValue = isc.Canvas._getFieldValue(dataPath, field, oldValues,
                                                            this, true);
...

Now the getField function is always called. Failing to return a proper field for the 'length' fieldName, newValue and oldValue remain null, and the field does not pass the validation to check that its value is has been set (the field is set as mandatory).
(0065269)
AugustoMauch   
2014-03-18 16:43   
The faulty behaviour of the getField('length') method has been reported to smartclient: http://forums.smartclient.com/showthread.php?p=117505#post117505 [^]
(0065270)
AugustoMauch   
2014-03-18 17:00   
A patch that solves the problem has been attached. This patch might be used if smartclient does not solve the problem described here: http://forums.smartclient.com/showthread.php?p=117505#post117505 [^]
(0065320)
hgbot   
2014-03-21 00:03   
Repository: erp/mods/org.openbravo.userinterface.smartclient.dev
Changeset: d5a02ffc2091e81bd2be59742e9064bd18499075
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Fri Mar 21 00:03:05 2014 +0100
URL: http://code.openbravo.com/erp/mods/org.openbravo.userinterface.smartclient.dev/rev/d5a02ffc2091e81bd2be59742e9064bd18499075 [^]

Modified Smartclient 10.0d 2014-02-13 SNAPSHOT to fix:
* Initial grey (non-working) date in isc.Calendar
* Fixed issue 25987: 'Process Definition' -> 'Parameter' tab can be edited again

---
M web/org.openbravo.userinterface.smartclient/isomorphic/client/widgets/CalendarView.js
M web/org.openbravo.userinterface.smartclient/isomorphic/client/widgets/ListGrid.js
M web/org.openbravo.userinterface.smartclient/isomorphic/system/development/ISC_Calendar.js
M web/org.openbravo.userinterface.smartclient/isomorphic/system/development/ISC_Grids.js
M web/org.openbravo.userinterface.smartclient/isomorphic/system/modules-debug/ISC_Calendar.js
M web/org.openbravo.userinterface.smartclient/isomorphic/system/modules-debug/ISC_Grids.js
M web/org.openbravo.userinterface.smartclient/isomorphic/system/modules/ISC_Calendar.js
M web/org.openbravo.userinterface.smartclient/isomorphic/system/modules/ISC_Grids.js
---
(0065321)
hgbot   
2014-03-21 00:04   
Repository: erp/devel/pi
Changeset: a3e91c862ccc02ddac136eba8d5b8170ce7afb8e
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Fri Mar 21 00:04:15 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/a3e91c862ccc02ddac136eba8d5b8170ce7afb8e [^]

[scupgrade] Modified Smartclient 10.0d 2014-02-13 SNAPSHOT to fix:
* Initial grey (non-working) date in isc.Calendar
* Fixed issue 25987: 'Process Definition' -> 'Parameter' tab can be edited again

---
M modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/isomorphic/ISC_Combined.js
---
(0065328)
hudsonbot   
2014-03-21 07:34   
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/264e48f53209 [^]
Maturity status: Test
(0065351)
AugustoMauch   
2014-03-21 11:03   
Code reviewed and verified in pi@617ac4497332