tracker issue : CF-4104997

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

cfgridcolumn type boolean does not update or insert correctly

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Robin Boudwin / Robin Boudwin (Robin Boudwin)

Created: 01/07/2016

Components: AJAX

Versions: 11.0

Failure Type: Non Functioning

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Normal / All users will encounter

Locale/System: English / Windows 7 64-bit

Vote Count: 0

Listed in the version 2016.0.02.299200 Issues Fixed doc
Verification notes: verified_fixed on September 30, 2019 using build 2016.0.02.299200
Problem Description:
There are problems when using the boolean type in cfgridcolumn.

1.  If the value is null, then it checks the boolean box as a true value
2.  The default values are checked.  They should not be selected.
3.  The insert and update do not work.

Steps to Reproduce:
<cfgridcolumn name="status" header="status" display="yes" type="boolean">

Actual Result:


Expected Result:

Any Workarounds:

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

Watson Bug ID:	4104997

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

Attachments:

Comments:

Hi Robin, We were able to repro the 3rd scenario, where the insert/update for cfgridcolumn type boolean was throwing an exception. Is this same behavior that you too observe? But the 1st scenario was not reproable; when the value was NULL the checkbox was not ticked. Also can you explain what the 2nd issue is? Thanks, Preethi
Comment by S P.
4911 | January 08, 2016 01:40:23 AM GMT
Hi Preethi, Thank you for working on this. I know you'll figure it out. 1. When my database value is null, it checks the box. I have format set to html. 2. When a new row is inserted, the checkboxes are all checked. There is also an Uncaught TypeError: Cannot read property 'xtype' of undefined 3. I don't get an exception error. It just doesn't work. Sincerely, Robin
Comment by External U.
4912 | January 08, 2016 08:07:12 AM GMT
When the mediaid column is changed (excellent, good, fair), the display goes back to the value (int) rather than the valuedisplay (text) when a new cell is selected. <cfset application.dsn = "cfartgallery"> <CFIF IsDefined("form.gridEntered") is True> <cfgridupdate grid="Artdisplay" tablename="ART" datasource="#application.dsn#" keyonly="true"> <cfdump var=#form#> </CFIF> <cfquery name="qArtdisplay" datasource="#application.dsn#" > Select ARTID, ARTNAME, MEDIAID from ART </cfquery> <cfform name="frm"> <cfgrid name="Artdisplay" query="qArtdisplay" format="html" insert="yes" delete="true" colHeaderBold = "Yes" selectMode = "EDIT" width="500" insertButton = "Insert a Row" deleteButton = "Delete selected row" font = "Tahoma" rowHeaders = "No" > <cfgridcolumn name="ARTID" width="100"> <cfgridcolumn name="ARTNAME" width="300"> <cfgridcolumn name="MEDIAID" header="MEDIAID" values="1,2,3" valuesdisplay="Excellent,Good,Fair" valuesdelimiter="," width="100"> </cfgrid> <cfinput type="submit" name="gridEntered"> </cfform>
Comment by External U.
4913 | January 19, 2016 02:15:32 PM GMT
Please ignore the code in the prior note (11:45:32 AM) and use this code instead: <CFIF IsDefined("form.gridEntered") is True> <cfgridupdate grid="Artdisplay" tablename="ART" datasource="#application.dsn#" keyonly="true"> <cfdump var=#form#> </CFIF> <cfquery name="qArtdisplay" datasource="#application.dsn#" > Select ARTID, ARTNAME, active from ART </cfquery> <cfform name="frm"> <cfgrid name="Artdisplay" query="qArtdisplay" format="html" insert="yes" delete="true" colHeaderBold = "Yes" selectMode = "EDIT" width="500" insertButton = "Insert a Row" deleteButton = "Delete selected row" font = "Tahoma" rowHeaders = "No" > <cfgridcolumn name="ARTID" width="100"> <cfgridcolumn name="ARTNAME" width="300"> <cfgridcolumn name="active" header="Boolean" display="yes" type="boolean"> </cfgrid> <cfinput type="submit" name="gridEntered"> </cfform>
Comment by External U.
4914 | January 19, 2016 03:30:28 PM GMT
Issue is fixed and this fix will be available via updates. (Comment added from ex-user id:prk)
Comment by Adobe D.
4915 | February 25, 2016 04:34:49 AM GMT
test note
Comment by CFwatson U.
4916 | June 07, 2016 04:19:38 AM GMT
The fix for this bug is available as part of the early-access build for ColdFusion 2016 Update 2.
Comment by CFwatson U.
4917 | June 07, 2016 04:26:37 AM GMT
Verified these 3 HTML cfgrid issues exist in CF11 Update 7 (build 11.0.07.296330): 1) If db table's bit column is NULL, cfgrid incorrectly renders a checked checkbox 2) Upon clicking grid's insert button, a new row is added in grid (good), but any checkboxes in the new row are checked (bad) 3) cfgridupdate deletes db table rows fine, but inserts fail (silent fail; no exception) Verified #1 and #2 are fixed in CF2016 Update 1 (build 2016.0.01.298513). Since the above Adobe comment says "The fix for this bug is available as part of the early-access build for ColdFusion 2016 Update 2.", and since this ticket is listed in CF2016 Update 2's list of Issues Fixed, #3 is seemingly fixed in CF2016 Update 2. This ticket should be removed from https://helpx.adobe.com/content/dam/help/attachments/cf2016-issues-fixed.pdf, since it isn't fixed in CF2016 Final. Thanks! -Aaron
Comment by Aaron N.
4918 | July 24, 2017 02:01:52 AM GMT
Hi Adobe, I've verified this is fixed in CF2016 Update 2 (build 2016.0.02.299200). This ticket's fix resolved #3 from my 07/24/2017 02:01:52 GMT comment. Thanks!, -Aaron
Comment by Aaron N.
31473 | September 30, 2019 07:02:26 AM GMT