<& /Minimal/Elements/Header, Title =>loc('Update ticket #[_1]', $Ticket->id) &> % my $default_portlist = $Ticket->FirstCustomFieldValue('Service Portlist'); % my $default_protocol = $Ticket->FirstCustomFieldValue('Service Protocol');
% if($Ticket->CurrentUserHasRight('ModifyTicket')){ % } % if (exists $session{'Attachments'}) { % } # end of if
<&|/l&>Status <%$Ticket->Status()%>
<&|/l&>Subject <% $Ticket->Subject %>
Service Portlist <& /RTIR/Elements/EditRTIRField, TicketObj => $Ticket, Name => 'Service Portlist', Default => $default_portlist &> of the form: 21,22,80-89
if multiple addresses exist, entire portlist will be tagged with each address
Service Protocol <& /RTIR/Elements/EditRTIRField, TicketObj => $Ticket, Name => 'Service Protocol', Default => $default_protocol &> ICMP - 1, TCP - 6, UDP - 17
if multiple protocols exist, leave blank to denote "all-ip"
<&|/l&>Attached file <&|/l&>Check box to delete
% foreach my $attach_name (keys %{$session{'Attachments'}}) { <%$attach_name%>
% } # end of foreach
<&|/l&>Attach
% unless ($Action eq 'Comment' || $Action eq 'Respond') { %#<& /Ticket/Elements/EditCustomFields, TicketObj => $Ticket &> %} <& /Elements/MessageBox, Name => "UpdateContent", QuoteTransaction => $ARGS{QuoteTransaction} &>
<& /Elements/Submit &>
<%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'); <%ARGS> $id => undef $Action => undef $DefaultStatus => undef