[rt-users] modification to Tickets/Update.html

Sean Perry sean.perry at intransa.com
Thu Jul 24 18:30:55 EDT 2003


My boss is a stickler for metrics so I updated Tickets/Update.html to 
prevent anyone from resolving a ticket without specifying how long they 
worked on it.  Basically I replaced the if (resolved) block at the top 
of <%INIT> with the following.

Thought others may appreciate it.

P.S. I have also updated the Ticket display so that rather than always 
using minutes the time is displayed as X hours, X minutes if the time is 
more than 60 minutes.  I find that my tasks take between 4 - 7 hours to 
complete so the minute display is just silly.

if ($DefaultStatus eq 'resolved') {
     # if we are resolving a ticket and there has been no time submitted,
     # do not allow the ticket to resolve.  must check that SubmitTicket is
     # set, or we prevent the close page from loading and thus NO ticket can
     # be resolved.
     if ((! defined($Ticket->TimeWorked) or $Ticket->TimeWorked == 0) and
         $ARGS{'UpdateTimeWorked'} == 0 and
         exists $ARGS{SubmitTicket} ) {
         Abort("Must enter amount of time worked");
     }
     $title = loc("Resolve ticket #[_1] ([_2])", $Ticket->id, 
$Ticket->Subject);
} else {
     $title = loc("Update ticket #[_1] ([_2])", $Ticket->id, 
$Ticket->Subject);
}




More information about the rt-users mailing list