[rt-users] Checking for forgotten tickets

Binand Raj S. binand at gmx.net
Thu Feb 27 02:13:19 EST 2003


On Wed, Feb 26, 2003 at 12:13:55PM -0800, 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.

Hi,

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

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..." &>
<TABLE BORDER=0 cellspacing=0 cellpadding=1 WIDTH=100%>
<TR>
<TH ALIGN=RIGHT>#</TH>
<TH ALIGN=LEFT>Subject</TH>
<TH ALIGN=LEFT>Age</TH>
<TH ALIGN=LEFT>Queue</TH>
<TH ALIGN=LEFT> </TH>
</TR>
% while (my $Ticket = $OrphanedTickets->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->AgeAsString %>
</TD>
<TD>
<%$Ticket->QueueObj->Name%>
</TD>
<TD ALIGN=RIGHT>
[<A HREF="<% $RT::WebPath %>/Ticket/Display.html?id=<%$Ticket->Id%>&Action=Take">Take</A>]
</TD>
</TR>
% }
</TABLE>
<& /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 &>
<BR>
<& /Elements/Orphans &>
<BR>
<& /Elements/MyRequests &>
</TD>

Binand




More information about the rt-users mailing list