General reminder emails

Hello, i currently have the following on my crontab to notify me every day at
2pm of opened or new tickets:

0 14 * * * root /opt/rt4/bin/rt-crontool --search RT::Search::FromSQL
–search-arg “Queue = ‘apoyo’ AND Owner != ‘Nobody’ AND ( Status = 'open’
OR Status = ‘new’ ) AND Created < ‘1 day ago’” --action RT::Action::Notify
–action-arg Owner,AlwaysNotifyActor --template ‘Recordatorio’ --transaction
first

My issue is that i get a email for each ticket and i would like something
more advanced, for example receiving just one mail with a list of these
tickets.

I am thinking the email should have a link to each ticket along with the
ticket description

Does RT come with something like this built in or would it require some
coding? I don’t really know perl but if at least i get some pointers
regarding outputting the list of tickets in just one email maybe i can edit
a template based on existing code. I am seeing
RT::Search::ActiveTicketsInQueue and i don’t know if that’s relevant, but
don’t know if a template can handle complete perl

View this message in context: http://requesttracker.8502.n7.nabble.com/General-reminder-emails-tp59838.html

You can create a dashboad to accomplish this.

https://www.bestpractical.com/docs/rt/4.2/dashboards.html
https://www.bestpractical.com/docs/rt/4.2/rt-email-dashboards.html
Later,
DarinOn Tue, Apr 7, 2015 at 10:38 AM, fleon fleon@seguroscatatumbo.com wrote:

Hello, i currently have the following on my crontab to notify me every day at
2pm of opened or new tickets:

0 14 * * * root /opt/rt4/bin/rt-crontool --search RT::Search::FromSQL
–search-arg “Queue = ‘apoyo’ AND Owner != ‘Nobody’ AND ( Status = 'open’
OR Status = ‘new’ ) AND Created < ‘1 day ago’” --action RT::Action::Notify
–action-arg Owner,AlwaysNotifyActor --template ‘Recordatorio’ --transaction
first

My issue is that i get a email for each ticket and i would like something
more advanced, for example receiving just one mail with a list of these
tickets.

I am thinking the email should have a link to each ticket along with the
ticket description

Does RT come with something like this built in or would it require some
coding? I don’t really know perl but if at least i get some pointers
regarding outputting the list of tickets in just one email maybe i can edit
a template based on existing code. I am seeing
RT::Search::ActiveTicketsInQueue and i don’t know if that’s relevant, but
don’t know if a template can handle complete perl


View this message in context: http://requesttracker.8502.n7.nabble.com/General-reminder-emails-tp59838.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.

Thank you, this seems to more or less do what i want. However, if i
understand correctly, i must create a saved search for each one of my
agents, since i don’t see a way to create just one dashboard with opened or
new tickets in a queue and the owner=‘myself’ or something like that, so
every user subscribed to that dashboard would get the email without needing
to create one dashboard for each user.

Also, when consulting the README, i saw that there is a tool to send email
digests. I will also try that option

View this message in context: http://requesttracker.8502.n7.nabble.com/General-reminder-emails-tp59838p59840.html

Thank you, this seems to more or less do what i want. However, if i
understand correctly, i must create a saved search for each one of my
agents, since i don’t see a way to create just one dashboard with opened or
new tickets in a queue and the owner=‘myself’ or something like that, so
every user subscribed to that dashboard would get the email without needing
to create one dashboard for each user.

Also, when consulting the README, i saw that there is a tool to send email
digests. I will also try that option

Set the owner to ‘CurrentUser’ in the search.

Jeff

Sorry, I was not paying attention to the first part, but if I understand, you are looking for a way to remind users that they have tickets that they need to respond to? I got some information a while back on RT statistics (or RTSTATS) which was a bunch of mysql statements written. I was able to adopt them into emailing me a report of which tickets had not been responded to. I place that script and cron job below. The link that I can find now is http://requesttracker.wikia.com/wiki/RT3StatisticsPackage It was written for RT3, so I am not sure if anything has changed. This is also dependent on being able to email from your RT system. I hope this helps. The cron tab runs a script that runs the report.

First I will show the crontab that runs the job at 12:00PM Monday-Friday
####### This cron will run a report from RT for tickets not responed to in last 24 hours
0 12 * * 1-5 /root/rtstats/stafftwentyfour.sh
Now I will show you the script stafftwentyfour.sh
#!/bin/sh
cd /root/rtstats
./twentyfourhour USER1
./twentyfourhour USER2
./twentyfourhour USER3
mail -s “Staff Reports For Request Tracker” jwilson@adomainname.com < /root/rtstats/twentyfour.txt
rm twentyfour.txt
./twentyfourhour USER1
./twentyfourhour USER2
./twentyfourhour USER3
./twentyfourhour USER4
./twentyfourhour USER5
./twentyfourhour USER6
mail -s “Staff Reports For Request Tracker” cnuckoles@adomainname.com < /root/rtstats/twentyfour.txt
rm twentyfour.txt
As you can see the script is made up into 3 parts

  1. The first part is to run the script twentyfourhour "username"
    This will run the script “twentyfourhour” for all users in the last 24 hours and creates a file twentyfour.txt with the results
    of which ticket has not been responded to in the last 24 hours
  2. The second part is to email twentyfour.txt in the body of the email to managers
  3. The 3rd part is to remove twentyfour.txt for the next use. If you did not remove the file the it would keep appending the
    results.

Now I will show you the script twentyfourhour
#!/usr/bin/perl

$Id: rt3-stats,v 1.4 2004/02/12 06:28:28 carl Exp $

rt3-staffreport

open(STDOUT, “>>twentyfour.txt”);
use DBI;
my $database = “rtdb”;
my $hostname = “”;
my $port = ‘’;
my $user = “rtuser”;
my $password = “RTPASSWORD”;
my $dsn = “DBI:mysql:database=$database;host=$hostname;port=$port”;
my $dbh = DBI->connect($dsn,
$user,
$password,
{‘RaiseError’ => 1});
format STDOUT_TOP =
Tickets not responded to in last 24 hours for @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$userid
Id Status Created LastUpdated Queue Subject
.
format STDOUT =
@<<<<<< @<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<< ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$ary[0],$ary[1], $ary[2], $ary[3], $ary[4], $ary[5]
~~ ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$ary[5]
.
$userid = $ARGV[0];
$query = “select Tickets.id, Tickets.Status, Tickets.Created, Tickets.LastUpdated, Queues.Name, Tickets.Subject from
Tickets,Queues,Users where Tickets.Queue=Queues.id and Tickets.Owner=Users.id and Users.Name=’$userid’ and
Tickets.Status!=‘Resolved’ and Tickets.Status!=‘Deleted’ and Tickets.LastUpdated < DATE_SUB(now(), INTERVAL 1 DAY)”;
$sth = $dbh->prepare($query) or die “Can’t prepare queue query”;
$rc = $sth->execute
or die “Can’t execute statement: $DBI::errstr”;
while (@ary = $sth->fetchrow_array) {
$ary[2] = date -d 'GMT $ary[2]';
$ary[3] = date -d 'GMT $ary[3]';
write;
}
$dbh->disconnect;
exit 0;-----Original Message-----
From: rt-users [mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of fleon
Sent: Wednesday, April 08, 2015 9:00 AM
To: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] General reminder emails

Thank you, this seems to more or less do what i want. However, if i understand correctly, i must create a saved search for each one of my agents, since i don’t see a way to create just one dashboard with opened or new tickets in a queue and the owner=‘myself’ or something like that, so every user subscribed to that dashboard would get the email without needing to create one dashboard for each user.

Also, when consulting the README, i saw that there is a tool to send email digests. I will also try that option

View this message in context: http://requesttracker.8502.n7.nabble.com/General-reminder-emails-tp59838p59840.html
Jeremy Wilson
MIS Manager
540.217.4100 ext 257
Mobile: 540.333.1418
www.androsna.com http://www.androsna.com
[androsnortha]
The content of this e-mail (including any attachments) is strictly confidential and may be commercially sensitive. If you are not, or believe you may not be, the intended recipient, please advise the sender immediately by return e-mail, delete this e-mail and destroy any copies.

Great, that would solve the issue of not needing to create multiple
dashboards. However, for the cycle to be complete i cannot seem to find the
way to subscribe a whole group to a dashboard. This is no biggie, since we
are only 4 users in the group queue, so i could tell them to subscribe
manually, but it would be ideal for me as the admin to subscribe everyone in
the group at once and maybe even not allowing them to disable their
subscription

View this message in context: http://requesttracker.8502.n7.nabble.com/General-reminder-emails-tp59838p59843.html