Re: [rt-users] Query in script not working

2008-02-26 Thread Mathew Snyder
FWIW, this is the script I came up with: #!/usr/bin/perl ### # Name: daily_transactions.pl # Version: 0.1 # Author: Mathew Snyder # Date: February 24, 2008 # Comments: This is a script which lists #

Re: [rt-users] Query in script not working

2008-02-26 Thread Mathew Snyder
Hmmm...that certainly would have been helpful. But I'm looking at the perldoc on Date.pm and I don't see SetToNow or GoBackDays Roy El-Hames wrote: Hi Mathew; Not sure if you are aware of it, but in case you did not RT gives you a very powerful Date functions in Date.pm, from a perl script

Re: [rt-users] Query in script not working

2008-02-26 Thread Roy El-Hames
Hi Mathew; Not sure if you are aware of it, but in case you did not RT gives you a very powerful Date functions in Date.pm, from a perl script you can do the below: use RT::Date; my $date = new RT::Date($RT::SystemUser); $date-SetToNow(); my $now = $date-ISO; $date-GoBackDays(1); my $yesterday

Re: [rt-users] Query in script not working

2008-02-26 Thread Roy El-Hames
SetToNow is in Date.pm, 3 rd function in the 3.6.4 version :¬) GoBack functions seems I have added them some time in the past couple of years, (possibly of the wiki.. the code is too neat to be mine), I have attached my Date_Vendor in case its helpful to you and anyone else Roy Mathew Snyder

[rt-users] Query in script not working

2008-02-25 Thread Mathew Snyder
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.

Re: [rt-users] Query in script not working

2008-02-25 Thread Stephen Turner
Quoting Mathew Snyder [EMAIL PROTECTED]: 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

Re: [rt-users] Query in script not working

2008-02-25 Thread Mathew Snyder
Printing $yesterday yields 2008-02-24. $tix-BuildSelectQuery gives SELECT main.* FROM Tickets main WHERE (main.Status != 'deleted') AND ( ( main.Queue = '1' OR main.Queue = '15' ) AND ( main.LastUpdated = '2008-02-24 05:00:00' AND main.LastUpdated = '2008-02-25 05:00:00' ) ) AND (main.Type =

Re: [rt-users] Query in script not working

2008-02-25 Thread Mathew Snyder
I've got the dates working. However, the tickets retrieved are still based on the day starting at 05:00:00 and ending the following morning at the same time. How can I tell it to only return tickets from between 00:00:00 and 23:59:00? Mathew Stephen Turner wrote: Quoting Mathew Snyder [EMAIL

Re: [rt-users] Query in script not working

2008-02-25 Thread Stephen Turner
Quoting Mathew Snyder [EMAIL PROTECTED]: I've got the dates working. However, the tickets retrieved are still based on the day starting at 05:00:00 and ending the following morning at the same time. How can I tell it to only return tickets from between 00:00:00 and 23:59:00? Mathew

Re: [rt-users] Query in script not working

2008-02-25 Thread Mathew Snyder
Stephen Turner wrote: Quoting Mathew Snyder [EMAIL PROTECTED]: I've got the dates working. However, the tickets retrieved are still based on the day starting at 05:00:00 and ending the following morning at the same time. How can I tell it to only return tickets from between 00:00:00 and