& /Minimal/Elements/Header, Title =>loc('Update ticket #[_1]', $Ticket->id) &> % my $default_portlist = $Ticket->FirstCustomFieldValue('Service Portlist'); % my $default_protocol = $Ticket->FirstCustomFieldValue('Service Protocol');
<%INIT> my ( $field, @results ); # {{{ Load the ticket #If we get handed two ids, mason will make them an array. bleck. # We want teh first one. Just because there's no other sensible way # to deal my @id = ( ref $id eq 'ARRAY' ) ? @{$id} : ($id); my $Ticket = new RT::Ticket( $session{'CurrentUser'} ); unless ( $Ticket->Load( $id[0] ) ) { $m->comp( 'Error.html', Why => loc( "Couldn't load ticket '[_1]'", $id ) ); $m->abort(); } #my $Ticket = LoadTicket($id); my $title = loc( "Update ticket #[_1]", $Ticket->id ); $DefaultStatus = $ARGS{Status} || $Ticket->Status() unless ($DefaultStatus); my $queue = 'Incident Reports'; my $queueObj = RT::Queue->new($session{'CurrentUser'}); $queueObj->Load($queue); Abort( loc("No permission to update ticket") ) unless ( $Ticket->CurrentUserHasRight('ReplyToTicket') ); my $category = $Ticket->FirstCustomFieldValue('Address category'); %INIT> <%ARGS> $id => undef $Action => undef $DefaultStatus => undef %ARGS>