tracker issue : CF-4152447

select a category, or use search below
(searches all categories and all time range)

[ANeff] ER for: sort member functions should return a useful value

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/Fixed

Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)

Created: 05/12/2016

Components: Member Functions

Versions: 2016

Failure Type: Enhancement Request

Found In Build/Fixed In Build: CF2016_Final / latest build

Priority/Frequency: Trivial / Unknown

Locale/System: English / Platforms All

Vote Count: 5

3844976 fixed .append() member functions to return a useful value for chaining. Same should be done for .sort() member functions.


 a = ["a", "c", "b"];
 s = {first={letter="a", number=1}, second={letter="b", number=2}, third={letter="c", number=3}};
 q = queryNew("letter", "varchar", [["a"], ["c"], ["b"]]);
 qUDF = function(r1, r2) {return compare(r1.letter, r2.letter);};
 a.sort("text").each(function(e) {writeOutput(e);});
 s.sort("text", "", "number").each(function(k,v,s) {writeOutput(v.letter);});
 q.sort(qUDF).each(function(r) {writeOutput(r.letter);});

Actual behavior:
- a.sort() example throws "The each method was not found."
- s.sort() example throws "An exception occurred while calling the function each."
- q.sort() example throws "The each method was not found."

Expected behavior: a.sort(), s.sort() and q.sort() examples should all return "abc"

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	4152447

External Customer Info:
External Company:  
External Customer Name: Aaron Neff
External Customer Email:



Adobe, Can you please change "Product Area" from "Language" to "Member Functions"? Thanks!, -Aaron
Comment by External U.
2856 | May 12, 2016 10:00:43 PM GMT
Aaron, updated the Product Area
Comment by HariKrishna K.
2857 | May 12, 2016 10:30:37 PM GMT
Additional related tickets: CF-4152461,CF-4152465,CF-4152471
Comment by External U.
2858 | May 12, 2016 11:16:37 PM GMT
Hi Hari, Thanks very much! -Aaron
Comment by External U.
2859 | May 12, 2016 11:18:15 PM GMT
Yes, please. Everything needs to be chainable for maximum usefulness.
Vote by Bradley W.
2860 | October 05, 2017 09:57:02 PM GMT