%# 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'}, &> <& '/RTIR/Search/Elements/RefineTabs', Title => $title, Ticket => $ChildObj, Queue => $Queue, BaseQuery => $BaseQuery, QueryString => $QueryString, current_tab => $current_tab, current_subtab => "RTIR/Search/Refine.html", &>
<& /RTIR/Search/Elements/ShowResults, Queue => $Queue, BaseQuery => $BaseQuery, Query => $Query, Format => '__RTIR_Radio__,'. $Format, Rows => $Rows, Page => $Page, OrderBy => $OrderBy, Order => $Order, BaseURL => $current_tab, &> <& /Elements/Submit, Name => "LinkChild", Caption => $title, Label => loc("Link"), &>
<%INIT> my $ChildObj = LoadTicket($id); $ARGS{'id'} = $id = $ChildObj->id; my $Type = RT::IR::TicketType( Ticket => $ChildObj ); my $title = loc( "Link [_1] #[_2] to selected Incident", $Type, $id ); # XXX: clear radio, checkboxes from format $Format =~ s/__RTIR_(?:Radio|Check)__,//; my $Queue = 'Incidents'; my $BaseQuery = $m->comp( '/RTIR/Elements/BaseQuery', Queue => $Queue ); $BaseQuery = join ' AND ', map "( $_ )", grep $_, $BaseQuery, "HasMember != $id"; $Query ||= $m->comp( '/RTIR/Elements/NewQuery', Queue => $Queue ); my $QueryString = $m->comp('/Elements/QueryString', Query => $Query, Format => $Format, Rows => $Rows, Page => $Page, OrderBy => $OrderBy, Order => $Order, ); my $current_tab = "RTIR/Incident/LinkToIncident.html?" . $m->comp( '/Elements/QueryString', id => $id, Queue => $Queue, ); <%ARGS> $id => undef $Query => undef $Format => RT->Config->Get('RTIRSearchResultFormats')->{'LinkIncident'} $Rows => 50 $Page => 1 $OrderBy => 'id' $Order => 'ASC'