PDA

View Full Version : Problem and fix with checkboxed-customfields and filters


frank_be
02-22-2008, 03:03 PM
Hi guys,

I svn up'ed to the latest build this morning, to have access to Custom Fields and the other new cool features that weren't in the build I was running. I added a custom field "Billing TODO" as a checkbox-type field, and wanted to create a custom view in my workspace to include only those tickets that had the custom field set to True. However, this didn't work. Whatever I did, the filter came up as "Billing TODO is null".

I checked the code, and found the culprit. Here is a one-line fix to make it work against api/Model.class.php:

Index: api/Model.class.php
================================================== =================
--- api/Model.class.php (revision 552)
+++ api/Model.class.php (working copy)
@@ -810,6 +810,7 @@
}
break;
case Model_TicketField::TYPE_CHECKBOX:
+ @$options = DevblocksPlatform::importGPC($_POST['value'],'integer',1);
if(!empty($options)) {
$criteria = new DevblocksSearchCriteria($field,$oper,$value);
} else {


Regards,

Frank Louwers
Openminds bvba

Hildy
02-22-2008, 08:18 PM
I checked with Jeff, and that code is broken, yeah, but he's checking a fix for that (and a tweak for the date fields), so check SVN in a little bit for that.