%# BEGIN LICENSE BLOCK %# %# Copyright (c) 2002-2003 Jesse Vincent %# %# This program is free software; you can redistribute it and/or modify %# it under the terms of version 2 of the GNU General Public License %# as published by the Free Software Foundation. %# %# A copy of that license should have arrived with this %# software, but in any event can be snarfed from www.gnu.org. %# %# This program 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. %# %# END LICENSE BLOCK <& /RTFM/Elements/Tabs, Title => loc('Extract article from ticket #[_1] into class [_2]',$Ticket, $ClassObj->Name) &>

<&|/l&>Use the dropdown menus to select which transactions you want to extract into a new RTFM article

% my $i; % while ( my $trans = $transactions->Next ) { % next unless $trans->Content; % }
Custom field Ticket update
<%$trans->CreatedObj->AsString%>: <%$trans->Description%>
<%$trans->Content%>
<& /Elements/Submit, Label => loc('Create'), color => "#993333" &>
<%INIT> my $ticket=LoadTicket($Ticket); my $transactions = $ticket->Transactions; my $ClassObj = RT::FM::Class->new($session{'CurrentUser'}); $ClassObj->Load($Class); unless ($ClassObj->Id) { $m->comp("/RTFM/Elements/Error", Why => "'%1' isn't a valid class identifier", $Class); } my $CustomFields = $ClassObj->CustomFields(); $CustomFields->Limit(FIELD => 'Type', OPERATOR => '=', VALUE => 'TextSingle'); $CustomFields->Limit(FIELD => 'Type', OPERATOR => '=', VALUE => 'WikiTextSingle'); <%ARGS> $Class=>undef $Ticket => undef