%# BEGIN LICENSE BLOCK %# %# Copyright (c) 1996-2002 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, Refresh => $session{'tickets_refresh_interval'} &> <& Elements/ReportTabs, Ticket => $IncidentObj, current_tab => 'RTIR/Incident/ShowReports.html?id='.$IncidentObj->id, current_subtab => 'RTIR/Incident/ReplyToReporters.html', Title => $title &>
> > > %if ($ticketcount && ! $ARGS{'HideResults'}) { <& /RTIR/Elements/TicketHeader, check => "check", Type => 'Report', %ARGS &> % my $i; % if ($All) { % } % $i = 0; % while (my $Ticket = $session{'tickets'}->Next) { % next unless ($Ticket->QueueObj->Name eq 'Incident Reports'); % my $incidents = $Ticket->MemberOf; % my $incident; % while (my $link = $incidents->Next) { % $incident = $link->TargetObj; % last if ($incident->Id == $id); % } % next unless ($incident and ($incident->Id == $id)); % $i++; <& /RTIR/Elements/TicketRow, Type => 'Report', Ticket => $Ticket, i=> $i, check => "check", %ARGS &> %} % if ($All) { <& /RTIR/Elements/TicketHeader, check => "check", Type => 'Investigation', %ARGS &> %while (my $Ticket = $session{'tickets'}->Next) { % next unless ($Ticket->QueueObj->Name eq 'Investigations'); % $i++; <& /RTIR/Elements/TicketRow, Type => 'Report', Ticket => $Ticket, i=> $i, check => "check", %ARGS &> % } % }
Reporters
Investigation Correspondents
<&|/l&>First page    % if ( $session{'tickets'}->FirstRow >= $session{'tickets_rows_per_page'}-1 ) { <<&|/l&>Previous page    % } % if ( $session{'tickets'}->FirstRow + $session{'tickets_rows_per_page'} < $ticketcount ) { <&|/l&>Next page> % } %#  <&|/l&>Goto page
(<&|/l, ($session{'tickets'}->FirstRow+1), ($session{'tickets'}->FirstRow() + $session{'tickets'}->RowsPerPage() ) &>[_1] - [_2] shown)
% }
<& /Elements/Submit, Name => "SubmitTicket", Caption => $SubmitCaption, Label => $SubmitLabel &>

<& /Elements/TitleBoxStart, title => loc('Current search criteria')&> <& /RTIR/Elements/SearchCriteria, Path => "/RTIR/Incident/Reply.html", %ARGS &> <& /Elements/TitleBoxEnd&> <& /RTIR/Elements/PickRestriction, ValueOfQueue => $Queue->Id, %ARGS &>
<%INIT> my $IncidentObj = LoadTicket($id); my ($title, $ticketcount, $found); my $Queue = new RT::Queue($session{'CurrentUser'}); $Queue->Load("Incident Reports") || Abort(loc("Queue could not be loaded.")); $session{'i'}++; if ($session{'tickets'}) { if ($ARGS{'DeleteRestriction'}) { $session{'tickets'}->DeleteRestriction($ARGS{'DeleteRestriction'}); } if ( ($ARGS{'ClearRestrictions'}) || ($ARGS{'NewSearch'}) ) { $session{'tickets'}->ClearRestrictions; my $fid; my $CustomFields = $Queue->CustomFields(); $CustomFields->{'find_disabled_rows'} = 1; while (my $CustomField = $CustomFields->Next()) { if ($CustomField->Name eq '_RTIR_State') { $fid = $CustomField->Id; $session{'tickets'}->LimitCustomField(CUSTOMFIELD => $fid, VALUE => 'open'); } } $session{'tickets'}->LimitQueue(VALUE => "Incident Reports"); if ($All) { $session{'tickets'}->LimitQueue(VALUE => "Investigations"); } } } ProcessSearchQuery(ARGS=>\%ARGS); $session{'tickets'}->RedoSearch(); if ( $session{'tickets'}->DescribeRestrictions()) { $ticketcount = $session{tickets}->Count(); $found = loc('Found [quant,_1,incident]', $ticketcount); } else { $found = loc("Find incidents"); } my ($SubmitCaption, $SubmitLabel); if ($ARGS{'DefaultStatus'} eq 'resolved') { $title = loc("Resolve Incident #[_1] (including children)", $id); $SubmitCaption = loc("Resolve Incident"); $SubmitLabel = loc("Resolve"); } else { $SubmitCaption = loc("Reply to selected correspondents"); $SubmitLabel = loc("Reply"); if ($All) { $title = loc("Incident #[_1]: Reply to All", $id); } else { $title = loc("Incident #[_1]: Reply to Reporters", $id); } } <%CLEANUP> $session{'tickets'}->PrepForSerialization(); <%ARGS> $id => undef $All => 0