[rt-users] Setting Time Worked as Mandatory Field
Hi Guys, I know this has been brought up a couple of times on the lists, but can't find anything that seems to work for me. What I am looking for is a way to stop tickets being resolved if there is no time worked set. I have seen a post where Richard Ellis stated that adding this to your /path/to/rt3/local/html/Ticket/Update.html this would work exactly as I would wish, however I am not entirely sure of how this file should be formatted, I understand that the files in /local/ should append to those in /share/: 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($TicketObj-TimeWorked) or $TicketObj-TimeWorked == 0) and $ARGS{'UpdateTimeWorked'} = 0 and exists $ARGS{'SubmitTicket'} ) { Abort(You cannot resolve a ticket with zero time worked. Please reselect the ticket and try again); } When I add this file and insert the above text by itself, when I try and update a ticket it mearly prints the above code out on the webpage, obviously I am missing some tags or code. If someone could enlighten me that would be great. Many Thanks. Dave ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] Setting Time Worked as Mandatory Field
On Thu, Sep 24, 2009 at 02:00:20PM +0100, Dave Wells wrote: Hi Guys, I know this has been brought up a couple of times on the lists, but can't find anything that seems to work for me. When I add this file and insert the above text by itself, when I try and update a ticket it mearly prints the above code out on the webpage, obviously I am missing some tags or code. If someone could enlighten me that would be great. You have to first copy the file from share to local, then modify it (RT is going to use the file in local/ and will not use the corresponding one in share). In your case, it would be cleaner to use callbacks: http://wiki.bestpractical.com/view/CustomizingWithCallbacks ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com