[rt-users] Ticket Custom Fields

Michael Osborne mjosborne1 at gmail.com
Mon Apr 2 03:24:57 EDT 2007


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20070402/2710dfdf/attachment.htm>


More information about the rt-users mailing list