[FILTER] [rt-users] RTFM search through body text 2.2.0RC5

Jeff Platter jplatter at vortexit.net
Thu Jun 7 15:02:06 EDT 2007


So I finally think I fixed the issue. If anyone is interested it seemed that
in the ArticleCollection_Overlay.pm file there was a select statement that
had 2 things wrong with it. It was generating the JOIN with OR's instead of
AND's and it was only searching through the Content field of the
ObjectCustomFieldValues table and not searching through the Largecontent
field as well.

 

I changed the JOIN criteria to an AND and i added in the Largecontent field
as well to the WHERE clause. This seems to have fixed the problem for me at
the moment. I have a patch file available if anyone else is having this
problem and would like to take a look at the file and try it out.

 

Here is the patch I wrote:

### Patch for getting Custom field searches working in RTFM 2.2.0RC5

### File location is /opt/rt3/local/lib/RT/FM/ArticleCollection_Overlay.pm

 

--- ArticleCollection_Overlay.pm    2007-06-07 13:33:19.000000000 -0400

+++ jp_ArticleCollection_Overlay.pm.bak 2007-06-07 13:32:32.000000000 -0400

@@ -254,7 +254,7 @@

             $self->Limit( LEFTJOIN        => $ObjectValuesAlias,

                           FIELD           => 'CustomField',

                           VALUE           => $args{'FIELD'},

-                          ENTRYAGGREGATOR => 'OR');

+                          ENTRYAGGREGATOR => 'AND');

             # Could convert the above to a non-left join and also enable
the thing below

             # $self->SUPER::Limit( ALIAS           => $ObjectValuesAlias,

             #                      FIELD           => 'CustomField',

@@ -323,6 +323,15 @@

     else {

         $self->SUPER::Limit(

             ALIAS           => $ObjectValuesAlias,

+            FIELD           => 'Largecontent',

+            OPERATOR        => $args{'OPERATOR'},

+            VALUE           => $value,

+            QUOTEVALUE      => $args{'QUOTEVALUE'},

+            ENTRYAGGREGATOR => $args{'ENTRYAGGREGATOR'},

+            SUBCLAUSE       => $clause,

+        );

+        $self->SUPER::Limit(

+            ALIAS           => $ObjectValuesAlias,

             FIELD           => 'Content',

             OPERATOR        => $args{'OPERATOR'},

             VALUE           => $value,

 

Thanks to everyone that helped me find this,

-Jeff

 

 

From: rt-users-bounces at lists.bestpractical.com
[mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Jeff Platter
Sent: Wednesday, June 06, 2007 6:05 PM
To: rt-users at lists.bestpractical.com
Subject: [FILTER] [rt-users] RTFM search through body text 2.2.0RC5

 

Hi,

 

I've newly installed RT 3.6.3 and RTFM 2.2.0RC5. I created a custom field
for the Article's body. The field name is called body and the type is a
wikitext area. Then I created a new class and added the body field to that
class. I setup the permissions so that I have full access to the class. 

 

I went ahead and created a new article in the class. Then when I go to the
advanced search and try and search for a word that is in the body field it
doesn't return any results. I did some searching on the mailing list archive
and have seen others with a similar problem but no answer yet. 

 

I have tried installing older versions of RTFM to see if they have the same
problems.  I installed ver 2.1.40 and that had the same problem. Then I went
all the way back to the latest final release of RTFM ver 2.0.4.  This one
actually does work. The only issue is that it is soooo old that it doesn't
really fit in well with 3.6.3 and there is a bunch of functionality missing.

 

Please someone help me. 

Thanks,

-Jeff


-- 
This message has been scanned for viruses and 
dangerous content by  <http://www.mailscanner.info/> MailScanner, and is 
believed to be clean. 


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20070607/264e00d6/attachment.htm>


More information about the rt-users mailing list