On Jun 7, 2007, at 3:02 PM, Jeff Platter wrote:

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.

Hi Jeff

I've applied the LargeContent portion of this in SVN.
I'm not sure I'm seeing the bug that caused you to change the ENTRYAGGREGATOR. Can you tell me
more about what that fix was for?

Thanks

-kevin

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: [EMAIL PROTECTED] [mailto:rt-users- [EMAIL PROTECTED] On Behalf Of Jeff Platter
Sent: Wednesday, June 06, 2007 6:05 PM
To: rt-users@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 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.
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Reply via email to