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