[Rt-commit] rt branch, 4.0/watcher-subfield-null-searches, created. rt-4.0.10-20-g5ade1fb

Ruslan Zakirov ruz at bestpractical.com
Thu Jan 31 19:47:48 EST 2013


The branch, 4.0/watcher-subfield-null-searches has been created
        at  5ade1fb744836e0271c53500e07826fb43f3a519 (commit)

- Log -----------------------------------------------------------------
commit 5ade1fb744836e0271c53500e07826fb43f3a519
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Fri Feb 1 04:47:01 2013 +0400

    stab at 'Requestor.Organization IS NULL' like searches

diff --git a/lib/RT/Tickets.pm b/lib/RT/Tickets.pm
index 20cdd92..9b5a2b1 100644
--- a/lib/RT/Tickets.pm
+++ b/lib/RT/Tickets.pm
@@ -941,7 +941,7 @@ sub _WatcherLimit {
     my $groups = $self->_RoleGroupsJoin( Type => $type, Class => $class, New => !$type );
 
     $self->_OpenParen;
-    if ( $op =~ /^IS(?: NOT)?$/i ) {
+    if ( $op =~ /^IS(?: NOT)?$/i && !$rest{'SUBKEY'} ) {
         # is [not] empty case
 
         my $group_members = $self->_GroupMembersJoin( GroupsAlias => $groups );
@@ -962,7 +962,7 @@ sub _WatcherLimit {
             %rest,
         );
     }
-    elsif ( $op =~ /^!=$|^NOT\s+/i ) {
+    elsif ( $op =~ /^!=$|\bNOT\b/i ) {
         # negative condition case
 
         # reverse op

-----------------------------------------------------------------------


More information about the Rt-commit mailing list