%# 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/LinkTabs, Queue => 'Incident Reports', Ticket => $IncidentObj, current_tab => 'RTIR/Incident/ShowReports.html?id='.$IncidentObj->id, current_subtab => 'RTIR/Incident/ReplyToReporters.html', Tab => 'Bulk Reply', Title => $title &>
> > > >

Reporters

<& /RTIR/Search/Elements/ShowResults, BaseQuery => $BaseQuery, Query => "($Query) AND Queue = 'Incident Reports'", QueryString => $QueryString, BaseURL => $BaseURL, Format => $Format, &>

Investigation Correspondents

<& /RTIR/Search/Elements/ShowResults, BaseQuery => $BaseQuery, Query => "($Query) AND Queue = 'Investigations'", QueryString => $QueryString, BaseURL => $BaseURL, Format => $Format, &> %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 if ($Ticket->FirstCustomFieldValue('_RTIR_State') eq 'resolved' || % $Ticket->FirstCustomFieldValue('_RTIR_State') eq 'rejected'); % next unless ($Ticket->QueueObj->Name eq 'Incident Reports'); % $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 if ($Ticket->FirstCustomFieldValue('_RTIR_State') eq 'resolved' || % $Ticket->FirstCustomFieldValue('_RTIR_State') eq 'rejected'); % next unless ($Ticket->QueueObj->Name eq 'Investigation'); % $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 &> <%INIT> $Format = $RT::RTIRSearchResultFormats->{'BulkReply'}; my $IncidentObj = LoadTicket($id); my ($title, $ticketcount, $found); my $QueueObj = new RT::Queue($session{'CurrentUser'}); $QueueObj->Load("Incident Reports") || Abort(loc("Queue could not be loaded.")); if (! $session{'tickets'}) { # Init a new search $session{'tickets'} = RT::Tickets->new( $session{'CurrentUser'} ); } if (!$Query) { $Query = "('CF.Incident Reports.{_RTIR_State}' = 'open' OR 'CF.Investigations.{_RTIR_State}' = 'open') AND MemberOf = $id"; } my $QueryString = "&".$m->comp('/Elements/QueryString', Query => $Query, Format => $Format, Rows => $Rows, OrderBy => $OrderBy, Order => $Order, Page => $Page); if (!$BaseQuery) { $BaseQuery = "Queue = 'Incident Reports'"; $BaseQuery = "($BaseQuery OR Queue = 'Investigations')" if $All; } $Query = "$BaseQuery AND ( $Query )"; my ($SubmitCaption, $SubmitLabel); if ($ARGS{'DefaultStatus'} eq 'resolved') { $title = loc("Resolve Incident #[_1] (including children)", $id); $SubmitCaption = loc("Resolve Incident"); $SubmitLabel = loc("Resolve"); } elsif ($ARGS{'DefaultStatus'} eq 'rejected') { $title = loc("Abandon Incident #[_1] (including children)", $id); $SubmitCaption = loc("Abandon Incident"); $SubmitLabel = loc("Abandon"); } 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 $BaseURL => $RT::WebPath . "/RTIR/Incident/Reply.html?DefaultStatus=stalled&id=$id" $BaseQuery => undef $Query => undef $Format => undef $HideResults => 0 $Rows => 50 $Page => 1 $OrderBy => 'id' $Order => 'ASC'