[freeside-commits] freeside/rt/share/html/Callbacks/CheckMandatoryFields/Ticket/Update.html BeforeDisplay, NONE, 1.1

Mark Wells mark at wavetail.420.am
Wed Sep 1 16:39:26 PDT 2010


Update of /home/cvs/cvsroot/freeside/rt/share/html/Callbacks/CheckMandatoryFields/Ticket/Update.html
In directory wavetail.420.am:/tmp/cvs-serv9525/share/html/Callbacks/CheckMandatoryFields/Ticket/Update.html

Added Files:
	BeforeDisplay 
Log Message:
RT mandatory custom fields, RT#9260

--- NEW FILE: BeforeDisplay ---
<%doc>
When the user tries to change a ticket's status to "resolved" through 
the Update interface, check mandatory fields.  If they aren't all set, 
redirect to Ticket Basics instead of updating.  Note that this will 
lose any comments/time/other information the user has entered.
</%doc>

<%init>
my $TicketObj = $ARGS{'Ticket'};
my $ARGSRef = $ARGS{'ARGSRef'};
my $oldStatus = $TicketObj->Status();
my $newStatus = $ARGSRef->{'Status'} || $ARGSRef->{'DefaultStatus'};
if( $oldStatus ne 'resolved' and 
    $newStatus eq 'resolved' and
    $m->comp('/Ticket/Elements/CheckMandatoryFields', 
              Ticket => $TicketObj
              ) ) {
    $m->clear_buffer;
    RT::Interface::Web::Redirect( 
      RT->Config->Get('WebURL')."Ticket/Modify.html?id=".$TicketObj->Id."&resolve=1"
    );
    $m->abort;
}
</%init>



More information about the freeside-commits mailing list