Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0027226Openbravo ERPA. Platformpublic2014-07-29 12:072014-08-11 09:44
caristu 
shankarb 
highmajoralways
closedfixed 
5
pi 
3.0PR14Q43.0PR14Q4 
alostale
Core
No
0027226: Possible undefined value should be controlled in OBPlainToOBMasked method
The OBPlainToOBMasked method in ob-utilities-number.js file receives several parameters. One of them is groupInterval and in some parts of the application this method is called without defining this parameter. For example in the blur function of the OBNumberItem class, this parameter is not defined.

If this value is not defined a javascript error is raised when the execution arrives to the following point of the OBPlainToOBMasked method:

if (groupCounter.toString() === groupInterval.toString() && k !== 1) {

It should be checked if the groupInterval is null or undefined before this point.
1) Create a new numeric base reference
2) Create a column and field in a window that uses the previous reference
3) Try to save a record that contains that field
Add a check in the OBPlainToOBMasked method like this:

  if (groupInterval === null || groupInterval === undefined) {
    groupInterval = OB.Format.defaultGroupingSize;
  }
No tags attached.
Issue History
2014-07-29 12:07caristuNew Issue
2014-07-29 12:07caristuAssigned To => AugustoMauch
2014-07-29 12:07caristuModules => Core
2014-07-29 12:07caristuResolution time => 1409263200
2014-07-29 12:07caristuTriggers an Emergency Pack => No
2014-07-29 12:08caristuProposed Solution updated
2014-07-29 12:08caristuIssue Monitored: networkb
2014-07-30 06:32shankarbAssigned ToAugustoMauch => shankarb
2014-07-30 08:32shankarbStatusnew => scheduled
2014-07-30 08:32shankarbfix_in_branch => pi
2014-07-31 06:05shankarbReview Assigned To => alostale
2014-07-31 06:05shankarbfix_in_branchpi =>
2014-07-31 06:09hgbotCheckin
2014-07-31 06:09hgbotNote Added: 0068991
2014-07-31 06:09hgbotStatusscheduled => resolved
2014-07-31 06:09hgbotResolutionopen => fixed
2014-07-31 06:09hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/be933e11432ce4785c2bea4ee38281f67d6f2c5e [^]
2014-08-08 18:54hudsonbotCheckin
2014-08-08 18:54hudsonbotNote Added: 0069248
2014-08-11 09:44alostaleNote Added: 0069286
2014-08-11 09:44alostaleStatusresolved => closed
2014-08-11 09:44alostaleFixed in Version => 3.0PR14Q4

Notes
(0068991)
hgbot   
2014-07-31 06:09   
Repository: erp/devel/pi
Changeset: be933e11432ce4785c2bea4ee38281f67d6f2c5e
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Wed Jul 30 11:58:04 2014 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/be933e11432ce4785c2bea4ee38281f67d6f2c5e [^]

Fixes issue 27226: Possible undefined value should be controlled in OBPlainToOBMasked method

When grouping interval is undefined, use the default grouping interval.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities-number.js
---
(0069248)
hudsonbot   
2014-08-08 18:54   
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/4450016dee64 [^]
Maturity status: Test
(0069286)
alostale   
2014-08-11 09:44   
code reviewed + tested