Title:
[ANeff] ER for: Allow Array NoCase functions to search for any object case-insensitively
| View in TrackerStatus/Resolution/Reason: To Fix//Investigate
Reporter/Name(from Bugbase): Aaron N. / ()
Created: 08/28/2019
Components: Language, Functions
Versions: 2016,2018,14.0
Failure Type:
Found In Build/Fixed In Build: CF 2018, CF 2016 /
Priority/Frequency: Normal /
Locale/System: / Platforms All
Vote Count: 0
This ER is to allow Array NoCase functions to search for any object case-insensitively.
History: CF-3316776 was fixed incorrectly, IMO. Searching for complex objects should've been fixed instead of removed.
Suggestion: If the 2nd parameter to the Array NoCase functions isn't a callback, then they should do JSON comparisons.
Pseudo code, using ArrayFindNoCase() as an example:
numeric function ArrayFindNoCase(required array array, required any value) {
var result = 0;
for(var i=1; i<=ARGUMENTS.array.len(); i++) {
if(serializeJSON(ARGUMENTS.array[i]) == serializeJSON(value)) {
result = i;
break;
}
}
return result;
}
This would fix Array's NoCase functions to behave as always expected, b/c searching case-insensitively for a non-simple value is just as useful as searching for it case-sensitively.
Related tickets: CF-3316776, CF-3335956 and CF-4202901
Attachments:
Comments: