[rt-users] Checking for forgotten tickets

Andreas Kruthoff andreas.kruthoff at softwired-inc.com
Thu Feb 27 03:15:01 EST 2003


On Wednesday 26 February 2003 21:13, Koji Yanagisawa wrote:
> 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 at 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 &>
<BR>
<& /Elements/MyQueues &>
<BR>
<& /Elements/MyRequests &>
</TD>
...

Elements/MyQueues:

<& /Elements/TitleBoxStart, title => "15 highest priority unclaimed tickets in 
the $queueCount queue(s) I watch..." &>
% if ($queueCount > 0) {
<TABLE BORDER=0 cellspacing=0 cellpadding=1 WIDTH=100%>
<TR>
<TH ALIGN=RIGHT>#</TH>
<TH ALIGN=LEFT>Subject</TH>
<TH ALIGN=LEFT>Queue</TH>
<TH ALIGN=LEFT>Status</TH>
<TH ALIGN=RIGHT>Age</TH>
<TH ALIGN=LEFT> </TH>
</TR>
% while (my $Ticket = $Tickets->Next) {
<TR>
<TD ALIGN=RIGHT>
<%$Ticket->Id%>
</TD>
<TD>
<A HREF="<% $RT::WebPath %>/Ticket/Display.html?id=<%$Ticket->Id%>">
<%$Ticket->Subject || '[no subject]'%>
</A>
</TD>
<TD>
<%$Ticket->QueueObj->Name%>
</TD><TD>
<%$Ticket->Status%>
</TD><TD NOWRAP ALIGN=RIGHT>
<%$Ticket->CreatedObj->AgeAsString%>
</TD>
<TD ALIGN=RIGHT>
[<A HREF="<% $RT::WebPath 
%>/Ticket/Display.html?id=<%$Ticket->Id%>&Action=Take&Status=open">Take</A>]
</TD>
<TD ALIGN=RIGHT>
[<A HREF="<% $RT::WebPath 
%>/Ticket/ModifyPeople.html?id=<%$Ticket->Id%>">People</A>]
</TD>
<TD ALIGN=RIGHT>
[<A HREF="<% $RT::WebPath 
%>/Ticket/Modify.html?id=<%$Ticket->Id%>">Basics</A>]
</TD>
</TR>
% }
</TABLE>
% }
<& /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




More information about the rt-users mailing list