%# 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', path => $path, current_tab => "RTIR/Incident/LinkToIncident.html?id=$id", Ticket => $ChildObj, Queue => 'Incidents', Title => $title, Format => $Format, Query => $Query, Rows => $Rows, OrderBy => $OrderBy, Order => $Order, QueryString => $QueryString, &>
> <& /RTIR/Search/Elements/ShowResults, Queue => $Queue, Query => $Query, QueryString => $QueryString, BaseURL => $BaseURL, Format => $Format, &> <& /Elements/Submit, Name => "SubmitTicket", Caption => $SubmitCaption, Label => loc("Link") &>

<%INIT> $Format = $RT::RTIRSearchResultFormats->{'LinkIncident'}; my ($Type, undef) = $m->comp('/RTIR/Elements/Type', Queue => 'Incidents'); my $ChildObj = LoadTicket($id); my $Queue = $ChildObj->QueueObj->Name; my $SubmitCaption = loc("Link #[_1] with selected Incident", $ChildObj->id); my $QueueObj = new RT::Queue($session{'CurrentUser'}); $QueueObj->Load('Incidents') || Abort(loc("Queue could not be loaded.")); my $title = loc("Link [_1] #[_2] to selected Incident", $Type, $id); if (!$Query) { $Query = $m->comp('/RTIR/Elements/NewQuery', Queue => 'Incidents'); } my $QueryString = "&".$m->comp('/Elements/QueryString', Query => $Query, Format => $Format, Rows => $Rows, OrderBy => $OrderBy, Order => $Order, Page => $Page); if (!$BaseQuery) { $BaseQuery = $m->comp('/RTIR/Elements/BaseQuery', Queue => 'Incidents'); } $Query = "$BaseQuery AND ( $Query )"; my $current_tab = "RTIR/Incident/LinkToIncident.html?id=9"; my $tab = $m->interp->apply_escapes($current_tab,'u'); my $path = "RTIR/Search/Refine.html?ResultPage=$BaseURL&Queue=Incidents&id=$id¤t_tab=$tab$QueryString", <%ARGS> $id => undef $BaseURL => $RT::WebPath . "/RTIR/Incident/LinkToIncident.html" $BaseQuery => undef $Query => undef $Format => undef $HideResults => 0 $Rows => 50 $Page => 1 $OrderBy => 'id' $Order => 'ASC'