[Rt-devel] Howto search on Customfield's largecontent ?

Christophe Nowicki cscm at meuh.dyndns.org
Wed Aug 2 10:48:39 EDT 2006


Hi Zakirov,

>> Hi,
>>
>> It seams that RT does not search on largecontent for custom fields.
>>
>> RT use two fields in order to manage customfields large content :
>>
>>  content         | character varying(255)      |
>>  largecontent    | text                        |
>>
>> When the value on the CF is bigger than 255, RT put the value in the
>> largecontent field but does NOT make search on that field.
>>
>> I'd like to known it witch file the search is build? In order to fix
>> that
>> issue.
> lib/RT/Tickets_Overlay.pm

Yes, I've patched the _CustomFieldLimit function :

...
    $self->_OpenParen if ($null_columns_ok);

    $self->_SQLLimit(
        ALIAS      => $TicketCFs,
        FIELD      => 'Content',
        OPERATOR   => $op,
        VALUE      => $value,
        QUOTEVALUE => 1,
        @rest
    );

+    $self->_SQLLimit(
+        ALIAS      => $TicketCFs,
+        FIELD      => 'LargeContent',
+        OPERATOR   => $op,
+        VALUE      => $value,
+        QUOTEVALUE => 1,
+        ENTRYAGGREGATOR => 'OR',
+    );

    if ($null_columns_ok) {
...

And now it's working, thanks

-- 
Nowicki Christophe
http://csquad.org




More information about the Rt-devel mailing list