[Rt-commit] r7881 - in rtfm/branches/2.1-TESTING: .

ruz at bestpractical.com ruz at bestpractical.com
Tue May 15 23:45:09 EDT 2007


Author: ruz
Date: Tue May 15 23:45:08 2007
New Revision: 7881

Modified:
   rtfm/branches/2.1-TESTING/   (props changed)
   rtfm/branches/2.1-TESTING/lib/RT/FM/ArticleCollection_Overlay.pm

Log:
 r328 at cubic-pc:  cubic | 2007-05-16 07:42:48 +0400
 * fix a failing test


Modified: rtfm/branches/2.1-TESTING/lib/RT/FM/ArticleCollection_Overlay.pm
==============================================================================
--- rtfm/branches/2.1-TESTING/lib/RT/FM/ArticleCollection_Overlay.pm	(original)
+++ rtfm/branches/2.1-TESTING/lib/RT/FM/ArticleCollection_Overlay.pm	Tue May 15 23:45:08 2007
@@ -225,7 +225,9 @@
     );
 
     my $value = $args{'VALUE'};
-    next unless $value;    #strip out total blank wildcards
+    # XXX: this work in a different way than RT
+    return unless $value;    #strip out total blank wildcards
+
     my $ObjectValuesAlias = $self->Join(
         TYPE   => 'left',
         ALIAS1 => 'main',
@@ -244,7 +246,6 @@
     if ( $args{'FIELD'} ) {
 
         my $field_id;
-
         if (UNIVERSAL::isa($args{'FIELD'} ,'RT::CustomField')) {
             $field_id = $args{'FIELD'}->id;
         } elsif($args{'FIELD'} =~ /^\d+$/) {
@@ -253,8 +254,8 @@
         if ($field_id) {
             $self->Limit( LEFTJOIN        => $ObjectValuesAlias,
                           FIELD           => 'CustomField',
-                          VALUE           => $args{'FIELD'},
-                          ENTRYAGGREGATOR => 'OR');
+                          VALUE           => $field_id,
+                          ENTRYAGGREGATOR => 'AND');
             # Could convert the above to a non-left join and also enable the thing below
             # $self->SUPER::Limit( ALIAS           => $ObjectValuesAlias,
             #                      FIELD           => 'CustomField',


More information about the Rt-commit mailing list