[Rt-commit] rt branch, 4.2/date-is-null, updated. rt-4.2.1-65-g2dfcad5

Alex Vandiver alexmv at bestpractical.com
Fri Jan 3 18:52:20 EST 2014


The branch, 4.2/date-is-null has been updated
       via  2dfcad5bb1dd63616e0adddeab86b4f15d4d06aa (commit)
      from  f8ccfdf3fd735192beb1d90790dc77735aced719 (commit)

Summary of changes:
 lib/RT/Tickets.pm |  2 ++
 t/api/tickets.t   | 10 ++++++++++
 2 files changed, 12 insertions(+)

- Log -----------------------------------------------------------------
commit 2dfcad5bb1dd63616e0adddeab86b4f15d4d06aa
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Fri Jan 3 18:51:50 2014 -0500

    Allow IS/IS NOT with LimitDate, by providing DefaultEA for them
    
    %DefaultEA only matters for the old Restrictions clauses; regardless,
    permit the new format there, for consistency.

diff --git a/lib/RT/Tickets.pm b/lib/RT/Tickets.pm
index 8888059..49524bc 100644
--- a/lib/RT/Tickets.pm
+++ b/lib/RT/Tickets.pm
@@ -202,6 +202,8 @@ my %DefaultEA = (
         '!=' => 'AND'
     },
     DATE => {
+        'IS' => 'OR',
+        'IS NOT' => 'OR',
         '='  => 'OR',
         '>=' => 'AND',
         '<=' => 'AND',
diff --git a/t/api/tickets.t b/t/api/tickets.t
index c2ddb79..7e75738 100644
--- a/t/api/tickets.t
+++ b/t/api/tickets.t
@@ -135,4 +135,14 @@ ok( $unlimittickets->Count > 0, "UnLimited tickets object should return tickets"
     undef $count;
 }
 
+{
+    my $tickets = RT::Tickets->new( RT->SystemUser );
+    $tickets->LimitDate( FIELD => "Resolved", OPERATOR => "IS",     VALUE => "NULL" );
+    $tickets->LimitDate( FIELD => "Resolved", OPERATOR => "IS NOT", VALUE => "NULL" );
+    warn $tickets->BuildSelectQuery;
+    my $count = $tickets->Count();
+    ok $count > 1, "Found more than one ticket";
+    undef $count;
+}
+
 done_testing;

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


More information about the rt-commit mailing list