[Rt-commit] [svn] r722 - in rt: . branches/rt-3.1/lib/RT branches/rt-3.3/lib/RT

autrijus at pallas.eruditorum.org autrijus at pallas.eruditorum.org
Wed Apr 21 18:32:20 EDT 2004


Author: autrijus
Date: Wed Apr 21 18:32:19 2004
New Revision: 722

Modified:
   rt/   (props changed)
   rt/branches/rt-3.1/lib/RT/SearchBuilder.pm
   rt/branches/rt-3.3/lib/RT/SearchBuilder.pm
Log:
 r4037 at not:  autrijus | 2004-04-21T22:30:37.269510Z
 
 * It turns out that for EMPTY => 1 to work, IS NULL needs to be OR'ed
   to the other columns as well...
 
 ----------------------------------------------------------------------
 r4038 at not:  autrijus | 2004-04-21T22:31:56.271421Z
 
 * merge previous commit from 3.3 to 3.1.


Modified: rt/branches/rt-3.1/lib/RT/SearchBuilder.pm
==============================================================================
--- rt/branches/rt-3.1/lib/RT/SearchBuilder.pm	(original)
+++ rt/branches/rt-3.1/lib/RT/SearchBuilder.pm	Wed Apr 21 18:32:19 2004
@@ -148,13 +148,16 @@
 	ENTRYAGGREGATOR => 'OR',
     );
 
-    $self->Limit(
-	ALIAS	   => $alias,
-	FIELD      => 'Content',
-	OPERATOR   => 'IS',
-	VALUE      => 'NULL',
-	ENTRYAGGREGATOR => 'OR',
-    ) if $args{EMPTY};
+    if ($args{EMPTY}) {
+	# Capture rows without the attribute defined by testing IS NULL.
+	$self->Limit(
+	    ALIAS      => $alias,
+	    FIELD      => $_,
+	    OPERATOR   => 'IS',
+	    VALUE      => 'NULL',
+	    ENTRYAGGREGATOR => 'OR',
+	) for qw( ObjectType Name Content );
+    }
 }
 # }}}
 

Modified: rt/branches/rt-3.3/lib/RT/SearchBuilder.pm
==============================================================================
--- rt/branches/rt-3.3/lib/RT/SearchBuilder.pm	(original)
+++ rt/branches/rt-3.3/lib/RT/SearchBuilder.pm	Wed Apr 21 18:32:19 2004
@@ -148,13 +148,16 @@
 	ENTRYAGGREGATOR => 'OR',
     );
 
-    $self->Limit(
-	ALIAS	   => $alias,
-	FIELD      => 'Content',
-	OPERATOR   => 'IS',
-	VALUE      => 'NULL',
-	ENTRYAGGREGATOR => 'OR',
-    ) if $args{EMPTY};
+    if ($args{EMPTY}) {
+	# Capture rows without the attribute defined by testing IS NULL.
+	$self->Limit(
+	    ALIAS      => $alias,
+	    FIELD      => $_,
+	    OPERATOR   => 'IS',
+	    VALUE      => 'NULL',
+	    ENTRYAGGREGATOR => 'OR',
+	) for qw( ObjectType Name Content );
+    }
 }
 # }}}
 


More information about the Rt-commit mailing list