Hello,
there is a problem with sorting of a grid with multiple columns.
Field 1 is a field of type "date".
Field 2 is a numeric field with a sort normalizer.
=> The sorting can be incorrect.
The error is in ISC_Core.js (Version v10.0p_2015-04-28/Pro) in funtion sortByProperties from line 25763 to 25882:
When sorting, the first field runs into the else part and dataType is set to "date".
The second field runs into the normalizer part, but there is no setting of the dataType variable, so the value of it is "date". Because the type of the field isn't date, the wrongTypeArray value is set and later the field will be sort by the wrongTypeArray value and not by the normalized value.
Please fix it.
Regards
Peter
there is a problem with sorting of a grid with multiple columns.
Field 1 is a field of type "date".
Field 2 is a numeric field with a sort normalizer.
=> The sorting can be incorrect.
The error is in ISC_Core.js (Version v10.0p_2015-04-28/Pro) in funtion sortByProperties from line 25763 to 25882:
Code:
if (isc.isA.Function(normalizer)) { ... if (dataType != null && !Array._matchesType(item[this.sortProps[i]], dataType)) { wrongTypeArray[i][ii] = item[this.sortProps[i]]; } ... } else { // if not passed an explicit normalizer, choose the appropriate function to normalize data // (see above) var dataType = null; ... dataType is set here in multiple lines 25806, 25825, 25833 ... if (dataType != null && !Array._matchesType(atomicValue, baseType)) { wrongTypeArray[i][ii] = item[this.sortProps[i]]; }
The second field runs into the normalizer part, but there is no setting of the dataType variable, so the value of it is "date". Because the type of the field isn't date, the wrongTypeArray value is set and later the field will be sort by the wrongTypeArray value and not by the normalized value.
Please fix it.
Regards
Peter
Comment