Checking for forgotten tickets

Greetings,

Has anyone implemented thru RT (like scrips conditions/actions) to check
for forgotten tickets (like tickets no one has taken for a day or two,
owner still nobody) and email about it? There’re some other ways to do
it, but I’d like to know if someone has done it within RT mechanism.

Thank you,
–Koji

Koji Yanagisawa wrote:

Has anyone implemented thru RT (like scrips conditions/actions) to check
for forgotten tickets (like tickets no one has taken for a day or two,
owner still nobody) and email about it? There’re some other ways to do
it, but I’d like to know if someone has done it within RT mechanism.

The “nag” script available in the contrib area is trivially modified
to do what you want. It’s designed to run from cron.
�|� http://www.bestpractical.com/rt – Trouble Ticketing. Free.

Greetings,

Has anyone implemented thru RT (like scrips conditions/actions) to check
for forgotten tickets (like tickets no one has taken for a day or two,
owner still nobody) and email about it? There’re some other ways to do
it, but I’d like to know if someone has done it within RT mechanism.

Hi,

Not exactly what you want, but for weeks I have been looking for an
opportunity to flaunt my first hacking experience with RT :slight_smile:

This code (Elements/Orphans) will have a box in the start page of RT
(similar to “25 tickets I own” or “25 tickets I requested”):

-----Cut here
<& /Elements/TitleBoxStart, title => “25 oldest orphaned tickets…” &>

% while (my $Ticket = $OrphanedTickets->Next) { % }
# Subject Age Queue  
<%$Ticket->Id%> <%$Ticket->Subject || '[no subject]'%> <%$Ticket->AgeAsString %> <%$Ticket->QueueObj->Name%> [Take]
<& /Elements/TitleBoxEnd &>

<%INIT>
my $OrphanedTickets;
$OrphanedTickets = new RT::Tickets ($session{‘CurrentUser’});
$OrphanedTickets->LimitOwner(VALUE => ‘Nobody’);
$OrphanedTickets->LimitStatus(VALUE => “new”);
$OrphanedTickets->OrderBy(FIELD => ‘Id’, ORDER => ‘ASC’);
$OrphanedTickets->RowsPerPage(25);

</%INIT>
-----Cut here

Just add a call to Elements/Orphans in index.html. Mine looks like
(somewhere in between):

<& /Elements/MyTickets &>


<& /Elements/Orphans &>


<& /Elements/MyRequests &>

Binand

Greetings,

Has anyone implemented thru RT (like scrips conditions/actions) to check
for forgotten tickets (like tickets no one has taken for a day or two,
owner still nobody) and email about it? There’re some other ways to do
it, but I’d like to know if someone has done it within RT mechanism.

Thank you,
–Koji


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm

We’ve a watcher / dispatcher for each queue. If a new ticket is created, the
dispatcher is notified via email and the new and unowned ticket shows up in
a box on the home page (index.html). He dispaches the ticket to the
corresponding person / queue.

In the MyQueues box, a watcher sees all the orphaned tickets.

index.html:

<& /Elements/CustomHomepageHeader, %ARGS &>
<& /Elements/MyTickets &>


<& /Elements/MyQueues &>


<& /Elements/MyRequests &>

...

Elements/MyQueues:

<& /Elements/TitleBoxStart, title => “15 highest priority unclaimed tickets in
the $queueCount queue(s) I watch…” &>
% if ($queueCount > 0) {

% while (my $Ticket = $Tickets->Next) { % }
# Subject Queue Status Age  
<%$Ticket->Id%> <%$Ticket->Subject || '[no subject]'%> <%$Ticket->QueueObj->Name%> <%$Ticket->Status%> <%$Ticket->CreatedObj->AgeAsString%> [Take] [People] [Basics]
% } <& /Elements/TitleBoxEnd &>

<%INIT>
my $userEmail = $session{‘CurrentUser’}->EmailAddress;
my $queueCount = 0;
my $Queues = new RT::Queues($session{‘CurrentUser’});
$Queues->UnLimit();

my $Tickets = new RT::Tickets ($session{‘CurrentUser’});
$Tickets->ClearRestrictions;
$Tickets->LimitOwner(VALUE => “Nobody”);
$Tickets->LimitStatus(VALUE => “resolved”, OPERATOR => ‘!=’);
$Tickets->LimitStatus(VALUE => “dead”, OPERATOR => ‘!=’);

while (my $queue = $Queues->Next) {
my $watcherEmails = $queue->Watchers()->EmailsAsString();
next if $watcherEmails !~ /\b$userEmail/;
$queueCount++;
$Tickets->LimitQueue(VALUE => $queue->id);
}

$Tickets->OrderBy(FIELD => ‘Priority’, ORDER => ‘DESC’);
$Tickets->RowsPerPage(15);
</%INIT>

-andreas