%# 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 => $IncidentObj, 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, DisplayFormat => "__CheckBox__, $Format", Format => $Format, Rows => $Rows, Page => $Page, OrderBy => $OrderBy, Order => $Order, BaseURL => $current_tab, &> <& /Elements/Submit, Name => "SubmitTicket", Caption => $title, Label => loc("Link") &>
<%INIT> my $IncidentObj = LoadTicket($id); $ARGS{'id'} = $id = $IncidentObj->id; my $Type = RT::IR::TicketType( Queue => $Queue ); my $title = loc("Link selected [_1] to Incident #[_2]", $Type, $id); my $QueryString = $m->comp('/Elements/QueryString', Query => $Query, Format => $Format, Rows => $Rows, Page => $Page, OrderBy => $OrderBy, Order => $Order, ); unless ( $BaseQuery ) { $BaseQuery = $m->comp('/RTIR/Elements/BaseQuery', Queue => $Queue); $BaseQuery = join ' AND ', map "( $_ )", $BaseQuery, "MemberOf != $id"; if ( RT->Config->Get('_RTIR_Constituency_Propagation') eq 'reject' ) { $BaseQuery = join ' AND ', map "( $_ )", $BaseQuery, "CustomField.{_RTIR_Constituency} = '". $IncidentObj->FirstCustomFieldValue('_RTIR_Constituency') ."'" } } my $current_tab = 'RTIR/Incident/LinkChildren.html?' . $m->comp( '/Elements/QueryString', id => $id, Queue => $Queue ); <%ARGS> $id => undef $Queue => undef $BaseQuery => undef $Query => $m->comp('/RTIR/Elements/NewQuery', Queue => $Queue) $Format => RT->Config->Get('RTIRSearchResultFormats')->{'LinkChildren'} $Rows => 50 $Page => 1 $OrderBy => 'id' $Order => 'ASC'