[rt-users] Require entry in Worked: field

Joe Casadonte joe.casadonte at oracle.com
Thu Feb 15 12:49:50 EST 2007


On 2/15/2007 5:22 AM, Richard Ellis wrote:
> We also have this in our local/html/Ticket/Update.html
> 
> 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");
>     }

An alternate approach would be to use JavaScript.  I have done this to 
make Subject a mandatory field.  Both approaches have strong pluses and 
minuses, and it may come down to a simple question of aesthetics.  The 
JavaScript approach is shown here:

    http://wiki.bestpractical.com/index.cgi?MandatorySubject

-- 
Regards,


joe
Joe Casadonte
joe.casadonte at oracle.com

==========                                                  ==========
== The statements and opinions expressed here are my own and do not ==
== necessarily represent those of Oracle Corporation.               ==
==========                                                  ==========



More information about the rt-users mailing list