UseRtReminder

From Request Tracker Wiki
Jump to navigation Jump to search

Rt-remind.pm is a reminder script that gathers open tickets and emails a summarized list to the ticket owners.

There is an old version on the best practical site which worked for me, but another RT user told me there was a newer version that supported multiple queues.

The latest version which supports multiple queues is at the following link. http://www.cs.kent.ac.uk/people/staff/tdb/rt3/rt-remind

Just place the script in your "./lib/RT" folder, for instance mine is at "/usr/local/rt3/lib/RT".

Set permissions to match your other scripts in the folder. chmod 755 rt-remind.pm

Edit script to match your environment, (ie.. perl, sendmail paths). Run the script on the interval of your choosing using cron or whatever else you may use.

Then wait and see just how many tickets you haven't completed :<)..

Enhancements

1. Add Queue name to e-mail output

Depending on your implementation, you may find it useful (or necessary) to include the queue name in your reminder e-mail. All that is needed is to edit two lines in the rt-remind script.

Open rt-remind in your favorite editor and wander down to line 178 (assuming you have an untouched version of rt-remind). You should see:

# Generate heading
 $msg .= sprintf "%5s  %-7s %3s  %-13s %-30s\n", "Id", "Status", "Pri", "Date", "Subject";
 
 

Replace this with:

# Generate heading
 $msg .= sprintf "%5s  %-7s %3s  %-13s %-15s %-30s\n", "Id", "Status", "Pri", "Date", "Queue", "Subject";
 
 

Then wander 10 lines further down and you should see:

my($line) = sprintf "%5d  %-7s %3d  %-13s %-30s", $Ticket->Id, $Ticket->Status, $Ticket->Priority, $date,
$Ticket->Subject;

Replace this with:

my($line) = sprintf "%5d  %-7s %3d  %-13s %-15s %-30s", $Ticket->Id, $Ticket->Status, $Ticket->Priority, $date,
$Ticket->QueueObj->Name, $Ticket->Subject;

For formatting purposes, you will want your queue names to be 15 characters or less and you may want/need to tweak the value of $linelen to make certain that sufficient Subject text is included in your e-mail.

Happy Tweaking!