tracker issue : CF-3043284

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

Bug 86176:If you call arraySort() on a database query row the result is that the sort will leave the first element in place and then sort the remaining elements

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Scott Stroz / Scott Stroz (Scott Stroz)

Created: 02/03/2011

Components: Language, Datastructure

Versions: 10.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 / 279826

Priority/Frequency: Trivial / Unknown

Locale/System: English / Mac 10 All

Vote Count: 0

Problem:

If you call arraySort() on a database query row the result is that the sort will leave the first element in place and then sort the remaining elements.
Method:

<cfset test = queryNew("id,description")/><cfset testData = ["First", "Second", "Third", "Fourth", "Fifth", "Sixth", "Seventh", "Eighth",                    "Ninth","Tenth"]/><cfloop from="1" to="#arrayLen(testData)#" index="i"><cfset queryAddRow(test)/><cfset querySetCell(test, "id", i)/><cfset querySetCell(test, "description", testData[i])/></cfloop><cfdump var="#test#"><cfset arraySort(test["description"], "text" ) /><cfset arraySort(testData, "Text") /><cfdump var="#test#"><cfdump var="#testData#">if you run this code, you will see that in the second cfdump of the query, the 'description' column is sorted, but only those items after the first row.  If you do an arrya sort on the original array, it works as expected.
Result:

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

Watson Bug ID:	3043284

External Customer Info:
External Company:  
External Customer Name: Scott Stroz
External Customer Email: 34F137864210D9AB9920157F
External Test Config: 02/03/2011

Attachments:

Comments: