Greetings fellow RT lovers,
I have been dabbling with various methods within Queue Templates to
duplicate a parent ticket’s custom fields.
I notice that this bit of code works (stolen from the Good Book - RT
Essentials) to get the custom field values as Content:
—cut—
Content:
{
my $OUT;
my $ticket = $Tickets{‘TOP’};
$cfs = $ticket->QueueObj->TicketCustomFields();
while ( my $cf = $cfs->Next )
{
my $Values = $ticket->CustomFieldValues($cf->Id());
$OUT .= “CustomField-” . $cf->Name .": ";
while( my $Value = $Values->Next()) {
$OUT .= $Value->Content . " ";
}
}
$OUT;
}
ENDOFCONTENT
—cut—
But does not populate the custom fields in the child ticket if placed above
the Content tag.
Which is puzzling, because you should end up with someting like this, when
the child is created:
CustomField-Scope: IBM AIX migration
CustomField-Systems Affected: qmlxxxdev
CustomField-Programs Affected: All perl scripts
Any clues?
Michael Osborne