%# BEGIN LICENSE BLOCK %# %# Copyright (c) 1996-2003 Jesse Vincent %# %# (Except where explictly superceded by other copyright notices) %# %# This work is made available to you under the terms of Version 2 of %# the GNU General Public License. A copy of that license should have %# been provided with this software, but in any event can be snarfed %# from www.gnu.org %# %# This work is distributed in the hope that it will be useful, but %# WITHOUT ANY WARRANTY; without even the implied warranty of %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU %# General Public License for more details. %# %# %# Unless otherwise specified, all modifications, corrections or %# extensions to this work which alter its source code become the %# property of Best Practical Solutions, LLC when submitted for %# inclusion in the work. %# %# %# END LICENSE BLOCK <& /RTIR/Elements/Header, Title => $title &> <& '/RTIR/'.$Type.'/Elements/Tabs', Ticket => $Ticket, current_subtab => "RTIR/Edit.html?id=$id", Title => $title &>
% if ( $ARGS{'Status'} ) { % } % if ($Type eq 'Report' and $ARGS{'DefaultStatus'} eq 'rejected') { % my $query = "Queue = 'Incidents' AND HasMember = $id"; % my $incidents = new RT::Tickets($session{'CurrentUser'}); % $incidents->FromSQL($query); % while (my $member = $incidents->Next) { % } % }
<&|/l&>Correspondents <&|/l&>Requestor: <% $Ticket->RequestorAddresses %>
  <&|/l&>Cc: <% $Ticket->CcAddresses %>
  <&|/l&>AdminCc: <% $Ticket->AdminCcAddresses %>

<& /RTIR/Elements/UpdateData, Ticket => $Ticket, Type => 'Incident', %ARGS &>
<&|/l&>State: <& /RTIR/Elements/ShowRTIRField, Ticket => $Ticket, Name => 'State' &>
<&|/l&>Update Type:
<&|/l&>Owner: <& /Elements/SelectOwner, Name=>"Owner", Default => ($ARGS{Owner}||$Ticket->Owner()||$session{'CurrentUser'}->Id||undef), QueueObj => $Ticket->QueueObj, TicketObj => $Ticket &> <&|/l&>Worked: <&|/l&>minutes
<&|/l&>Subject:
<& /Elements/Submit, Name => 'SubmitTicket' &> <%INIT> my $title; my $Ticket = LoadTicket($id); $id = $ARGS{'id'} = $Ticket->Id; my $Type = RT::IR::TicketType( Ticket => $Ticket ); my $name; if ($Type eq 'Report') { $name = "Incident Report"; } else { $name = $Type; } $DefaultStatus ||= $ARGS{'Status'} || ''; $ARGS{'Status'} ||= $DefaultStatus; # XXX: we should get rid of the DefaultStatus $DefaultStatus = 'open' if $DefaultStatus eq 'new'; if ( $DefaultStatus eq 'resolved' ) { $title = loc("Resolve [_1] #[_2] ([_3])", $name, $id, $Ticket->Subject); } elsif ( $DefaultStatus eq 'rejected' ) { if ( $Type eq 'Incident' ) { $title = loc("Abandon [_1] #[_2] ([_3])", $name, $id, $Ticket->Subject); } else { $title = loc("Reject [_1] #[_2] ([_3])", $name, $id, $Ticket->Subject); } } else { $title = loc("Update [_1] #[_2] ([_3])", $name, $id, $Ticket->Subject); } my $CanRespond = 0; my $CanComment = 0; # Things needed in the template - we'll do the processing here, just # for the convenience: my ($CommentDefault, $ResponseDefault); if (($Action eq 'Comment') or ($ARGS{'UpdateType'} eq 'private')) { $CommentDefault = "SELECTED"; } else { $ResponseDefault = "SELECTED"; } my $Subject = $ARGS{'UpdateSubject'} || $Ticket->Subject; my $replystring = lc(RT->Config->Get('ReplyString')); if ( $Action eq 'Respond' && $replystring && lc(substr($Subject, 0, length($replystring))) ne $replystring) { $Subject = RT->Config->Get('ReplyString') . " " . $Subject; } $CanRespond = 1 if ( $Ticket->CurrentUserHasRight('ReplyToTicket') or $Ticket->CurrentUserHasRight('ModifyTicket') ); $CanComment = 1 if ( $Ticket->CurrentUserHasRight('CommentOnTicket') or $Ticket->CurrentUserHasRight('ModifyTicket') ); $m->comp( '/RTIR/Create.html:ProcessAttachments', %ARGS ); if ( exists $ARGS{SubmitTicket} ) { return $m->comp('/RTIR/Display.html', %ARGS); } <%ARGS> $id => undef $DefaultStatus => undef $Action => undef