[freeside-commits] freeside/rt/share/html/Search/Elements PickCFs, 1.1.1.1, 1.2

Ivan,,, ivan at wavetail.420.am
Mon Jul 19 17:59:04 PDT 2010


Update of /home/cvs/cvsroot/freeside/rt/share/html/Search/Elements
In directory wavetail.420.am:/tmp/cvs-serv3908/share/html/Search/Elements

Modified Files:
	PickCFs 
Log Message:
RT custom fields patch, RT#8449

Index: PickCFs
===================================================================
RCS file: /home/cvs/cvsroot/freeside/rt/share/html/Search/Elements/PickCFs,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -w -d -r1.1.1.1 -r1.2
--- PickCFs	31 Dec 2009 13:14:27 -0000	1.1.1.1
+++ PickCFs	20 Jul 2010 00:59:02 -0000	1.2
@@ -76,8 +76,17 @@
 my @lines;
 while ( my $CustomField = $CustomFields->Next ) {
     my %line;
-    $line{'Name'} = "'CF.{" . $CustomField->Name . "}'";
+    $line{'Name'} = "CF.{" . $CustomField->Name . "}";
     $line{'Field'} = $CustomField->Name;
+
+    # Op
+    if ($CustomField->Type eq 'Date') {
+        $line{'Op'} = {
+            Type => 'component',
+            Path => '/Elements/SelectDateRelation',
+            Arguments => {},
+        };
+    } else {
     $line{'Op'} = {
         Type => 'component',
         Path => '/Elements/SelectCustomFieldOperator',
@@ -87,11 +96,23 @@
                        FalseVal => '!=',
                      },
     };
+    }
+
+    # Value
+    if ($CustomField->Type eq 'Date') {
+        $line{'Value'} = {
+            Type => 'component',
+            Path => '/Elements/SelectDate',
+            Arguments => {},
+        };
+    } else {
     $line{'Value'} = {
         Type => 'component',
         Path => '/Elements/SelectCustomFieldValue',
         Arguments => { CustomField => $CustomField },
     };
+    }
+
     push @lines, \%line;
 }
 



More information about the freeside-commits mailing list