tracker issue : CF-3739782

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

CFCLIENT: structSort doesnt work as expected when sorting is done on nested struct keys

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): / ext-user (Anuj Nawani)

Created: 04/09/2014

Components: Mobile Support, Data Structure

Versions: 11.0

Failure Type:

Found In Build/Fixed In Build: 289685 /

Priority/Frequency: Major / All users will encounter

Locale/System: English / Windows 7 64-bit

Vote Count: 0

Listed in the version 11.0.03.292480 Issues Fixed doc
<div id="actual_3" class="actual">
<cfscript>
employees = structNew();
for ( i=1; i lt 7; i=i+1 )
{
salary = 1200 - i*100 ;
emp = structNew() ;
emp["salary"] = salary ; 
employees["emp#i#"] = emp ;
}
</cfscript>
<CFSET res = employees.sort( "numeric", "asc", "salary")>
<CFLOOP INDEX="X" FROM=1 TO="#arrayLen(res)#">
<cfoutput>#res[X]#(#employees[res[X]].salary#)</cfoutput>
</CFLOOP>
</div>

Expected: Should get sorted on basis of salary : o/p should be - emp6(600) emp5(700) emp4(800) emp3(900) emp2(1000) emp1(1100)
Actual: Does not sorts : o/p is - emp1(1100)emp2(1000)emp3(900)emp4(800)emp5(700)emp6(600)

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

Watson Bug ID:	3739782

External Customer Info:
External Company:  
External Customer Name:  
External Customer Email:

Attachments:

Comments:

Hi Anuj, I've verified this is fixed in CF11 Update 3 (11,0,03,292024(PreRelease)). Thanks!, -Aaron
Comment by External U.
12743 | November 15, 2014 07:27:57 PM GMT