I'm trying to get all of the tickets which, for any given day, were LastUpdated
'yesterday'.  When I do a search within RT using " LastUpdated = '2008-02-24'
AND  (  Queue = 'CustomerCare' OR Queue = 'TechOps' )" I'm shown 8 tickets.
However, when I run the following script I get nothing.

#!/usr/bin/perl

use warnings;
use strict;
use lib '/usr/local/rt3/lib';
use lib '/usr/local/rt3/local/lib';
use RT;
use RT::Tickets;

RT::LoadConfig();
RT::Init();

my @date2 = (localtime(time - 86400))[3 .. 5];
my $yesterday = join "-", ($date2[2] + 1900, (sprintf '%02d',$date2[1] + 1),
(sprintf '%02d', $date2[0]));

my $tix = new RT::Tickets(RT::SystemUser);
$tix->FromSQL('(Queue = "CustomerCare" OR Queue = "TechOps") AND LastUpdated =
"' . $yesterday . '"');

while (my $ticket = $tix->Next) {
    print $ticket->id . "\n";
}

Anyone care to put a second(or third or fourth) pair of eyes on this to maybe
see something I've missed?

Thanks
Mathew
-- 
Keep up with me and what I'm up to: http://theillien.blogspot.com
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Reply via email to