[rt-users] ticket announce email

2007-11-27 Thread Mathew Snyder
I'm considering implementing a method of telling those that need to know when a ticket has been in our triage queue untouched for a predetermined amount of time (say, five minutes). I'd like to poll this queue and, if a ticket which meets these requirements exists, send an email out telling people

Re: [rt-users] ticket announce email

2007-11-27 Thread Gene LeDuc
I do it using days, not minutes, but the concept is the same. Try using a cron job that runs every 2 minutes. The perl API makes it easy to read ticket values, so it would be pretty straightforward to compare Updated to now() and send an e-mail if the difference is > 5min. It's possible this

Re: [rt-users] ticket announce email

2007-11-27 Thread Kevin Squire
I too do it on a daily basis... but I used the rt-remind script. http://www.cs.kent.ac.uk/people/staff/tdb/rt3/ they have a few scripts, and I use them all on my 3.6 box. On Tue, 27 Nov 2007 16:33:50 -0500 Mathew Snyder <[EMAIL PROTECTED]> wrote: > I'm considering implementing a method of telli

Re: [rt-users] ticket announce email

2007-11-28 Thread Mathew Snyder
This is the script I came up with: #!/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; use RT::Users; use MIME::Lite; use Date::Parse; RT::LoadConfig(); RT::Init(); my $tix = new RT::Tickets(RT::SystemUser); $tix->F

Re: [rt-users] ticket announce email

2007-11-28 Thread Gene LeDuc
Hi Mathew, Start by printing out the applicable elements ([0] - [5] and [8]) from localtime(str2time($ticket->Created)) and comparing them to what you see in RT, then print the same elements from localtime(time) and see what you get. If it's a timezone or DST issue you can compensate for it.

Re: [rt-users] ticket announce email

2007-11-28 Thread Mathew Snyder
Forgive my ignorance but, I'm not seeing how to compare them to what I see in RT. Elements 0-5 and 8 from localtime(str2time($ticket->Created): 54 3 18 28 10 107 0 What the Created field for the ticket I'm looking at says: Wed Nov 28 13:03:54 2007 Elements 0-5 and 8 from localtime(time()); 52 4