[Rt-commit] rt branch, 4.2/allow-status-like, created. rt-4.2.3-56-g3b6ad1d

Alex Vandiver alexmv at bestpractical.com
Fri Mar 21 11:50:23 EDT 2014


The branch, 4.2/allow-status-like has been created
        at  3b6ad1d7eeeb0d11a1a1dbae2cb74cbcd27f18e6 (commit)

- Log -----------------------------------------------------------------
commit 3b6ad1d7eeeb0d11a1a1dbae2cb74cbcd27f18e6
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Fri Mar 21 11:50:04 2014 -0400

    Allow Status to use string comparisons (LIKE, NOT LIKE)
    
    Fixes issues #29654

diff --git a/lib/RT/Tickets.pm b/lib/RT/Tickets.pm
index 140e09d..a898e17 100644
--- a/lib/RT/Tickets.pm
+++ b/lib/RT/Tickets.pm
@@ -103,7 +103,7 @@ __PACKAGE__->RegisterCustomFieldJoin(@$_) for
 # metadata.
 
 our %FIELD_METADATA = (
-    Status          => [ 'ENUM', ], #loc_left_pair
+    Status          => [ 'STRING', ], #loc_left_pair
     Queue           => [ 'ENUM' => 'Queue', ], #loc_left_pair
     Type            => [ 'ENUM', ], #loc_left_pair
     Creator         => [ 'ENUM' => 'User', ], #loc_left_pair
@@ -380,8 +380,6 @@ sub _EnumLimit {
         $value = $o->Id || 0;
     } elsif ( $field eq "Type" ) {
         $value = lc $value if $value =~ /^(ticket|approval|reminder)$/i;
-    } elsif ($field eq "Status") {
-        $value = lc $value;
     }
     $sb->Limit(
         FIELD    => $field,
@@ -698,6 +696,10 @@ sub _StringLimit {
         $value = 'NULL';
     }
 
+    if ($field eq "Status") {
+        $value = lc $value;
+    }
+
     $sb->Limit(
         FIELD         => $field,
         OPERATOR      => $op,

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


More information about the rt-commit mailing list