tracker issue : CF-3342785

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

json serialization

| View in Tracker

Status/Resolution/Reason: Closed/Won't Fix/LowImpact

Reporter/Name(from Bugbase): Ken Caldwell / Ken Caldwell (Ken Caldwell)

Created: 10/08/2012

Components: AJAX

Versions: 9.0.1

Failure Type:

Found In Build/Fixed In Build: 9.0.1 /

Priority/Frequency: Major / All users will encounter

Locale/System: English / Win 2008 Server R2 64 bit

Vote Count: 0

Problem Description: When using QueryConvertForGrid a Yes/No text value is converted to true/false

Steps to Reproduce:
The cfc
<cffunction name="getItems" access="remote" output="false">
	<cfargument name="page">
	<cfargument name="pageSize">
	<cfargument name="gridsortcolumn">
	<cfargument name="gridsortdirection">

	<cfset Session.qItems = querynew("fld_id, fld_label, fld_value", "Integer, VarChar, VarChar")>

	<cfset newRow = QueryAddRow(Session.qItems, 2)>

	<cfset temp = QuerySetCell(Session.qItems, "fld_id", 1, 1)>
	<cfset temp = QuerySetCell(Session.qItems, "fld_label", "Yes", 1)>
	<cfset temp = QuerySetCell(Session.qItems, "fld_value", "Yes", 1)>
	<cfset temp = QuerySetCell(Session.qItems, "fld_id", 2, 2)>
	<cfset temp = QuerySetCell(Session.qItems, "fld_label", "No", 2)>
	<cfset temp = QuerySetCell(Session.qItems, "fld_value", "No", 2)>

	<cfreturn QueryConvertForGrid(Session.qItems, page, pageSize)> </cffunction>

The grid page
<cfform name="myform">
	<cfgrid 
		name="mygrid" 
		width="280" 
		autowidth="true" 
		format="html" 
		bind="cfc: items.getItems({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})" 				striperows="yes">
            <cfgridcolumn name="fld_item_id" display="yes"/>
            <cfgridcolumn name="fld_label" display="yes" header="Label"/>
            <cfgridcolumn name="fld_value" display="yes" header="Value"/>
        </cfgrid>
</cfform>



Actual Result:

Expected Result:

Any Workarounds:

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

Watson Bug ID:	3342785

External Customer Info:
External Company:  
External Customer Name: KenRC
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments:

This is a fundamental behavior of CFML where yes/no is automatically converted to boolean and changing this will cause backward compatibility issues. Deferring this.
Comment by Rupesh K.
17667 | February 11, 2014 12:52:35 AM GMT