Status/Resolution/Reason: Closed/Won't Fix/LowImpact
Reporter/Name(from Bugbase): Jeff Coughlin / Jeffrey Coughlin (Jeff Coughlin)
Created: 10/04/2011
Components: General Server
Versions: 9.0.1
Failure Type: Unspecified
Found In Build/Fixed In Build: 0000 /
Priority/Frequency: Trivial / Unknown
Locale/System: English / Platforms All
Vote Count: 0
Problem:
Whe using the CF9.0.1 CHF 2 jar, the data output in some fields (using the sample code) are modified to bad data. In some cases we had date/time data saved as a string or date, yet it still modifed the data either way. In other cases we had a string that would look like "00:12" and CF would convert it to "-1".
Remove the new jar, or replace it with the CHF1 jar, and it works as expected again. Put the CHF2 jar back in and it breaks again.
Tested in Win-64 and OSX-64.
Method:
<!--- Run the following code with the CF9.0.1 CHF2 jar, and it changes the data dramatically for the date and time fields (which are saved as varchar fields, not actual date/time fields). Remove the CF9.0.1 CHF2 jar (or replace with CFH1 jar) and restart CF, then the spreadsheet functions seen below work normally again and the data in the excel files work great. --->
<cfscript>
qData = queryNew("location,waitTime,dateTimeLastUpdated", "VarChar,VarChar,VarChar");
queryAddRow(qData, 3);
querySetCell(qData, "location", "Location A", 1);
querySetCell(qData, "waitTime", "00:05", 1);
querySetCell(qData, "dateTimeLastUpdated", "2011-10-02 20:26:59.787", 1);
querySetCell(qData, "location", "Location B", 2);
querySetCell(qData, "waitTime", "00:03", 2);
querySetCell(qData, "dateTimeLastUpdated", "2011-10-02 20:26:59.787", 2);
querySetCell(qData, "location", "Location C", 3);
querySetCell(qData, "waitTime", "01:17", 3);
querySetCell(qData, "dateTimeLastUpdated", "2011-10-02 20:26:59.787", 3);
xls = spreadsheetNew("EDWaitTimes");
spreadsheetAddRows(xls,qData);
spreadsheetAddRow(xls,"Location,Wait Time,Date/Time Last Updated",1,true);
</cfscript>
<cfdump var="#qData#" />
<cfset destinationDirectory = getDirectoryFromPath(expandPath("./")) & "xls/" />
<cfset destinationFileName = "test_" & dateFormat(now(), "yyyymmdd") & "_" & timeFormat(now(), "HHmmss") & ".xls" />
<cfif not directoryExists(destinationDirectory)>
<cfdirectory action="create" directory="#destinationDirectory#" mode="777" />
</cfif>
<cffile action="write" output="#spreadsheetReadBinary(xls)#" file="#destinationDirectory##destinationFileName#"/>
Result:
spreadsheet functionality breaking in CF9.0.1 CHF 2. Sample code provided.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3044050
External Customer Info:
External Company:
External Customer Name: Jeffrey Coughlin
External Customer Email: 647F5E7B4480916D99201549
External Test Config: 10/04/2011
Attachments:
Comments: