<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Hello,</div><div class=""><br class=""></div><div class="">It seems that one cannot load the values of a CF with <font face="Courier New" class="">$Ticket{'TOP'}->CustomFieldValues($fieldname)</font>.  The result is an empty variable.  I've confirmed that the foreach works for each of the $cfname in the @cflist since I get log entries for them but $cfvs->Next doesn't produce a value (nothing is logged).</div><div class=""><br class=""></div><div class=""><div class=""><font face="Courier New" class="">===Create-Ticket: Investigation</font></div><div class=""><font face="Courier New" class="">{</font></div><div class=""><font face="Courier New" class="">  my @cflist = [ 'Customfield1', 'Customfield2', 'etc'];</font></div><div class=""><font face="Courier New" class="">  our @CFTEXT;</font></div><div class=""><font face="Courier New" class="">  foreach my $cfname (@cflist) {</font></div><div class=""><span style="font-family: 'Courier New';" class="">    RT::Logger->info($cfname);</span></div><div class=""><font face="Courier New" class="">    my $cfvs = $Tickets{"TOP"}->CustomFieldValues($cfname);</font></div><div class=""><font face="Courier New" class="">    while (my $cfv = $cfvs->Next) {</font></div><div class=""><font face="Courier New" class="">      RT::Logger->info($cfname.": ".$cfv->Content);</font></div><div class=""><font face="Courier New" class="">      push @CFTEXT, "CF-".$cfname.": ".$cfv->Content;</font></div><div class=""><font face="Courier New" class="">    }</font></div><div class=""><font face="Courier New" class="">  }</font></div><div class=""><font face="Courier New" class="">}</font></div><div class=""><font face="Courier New" class="">Queue: Investigations</font></div><div class=""><font face="Courier New" class="">Parents: TOP</font></div><div class=""><font face="Courier New" class="">Status: open</font></div><div class=""><font face="Courier New" class="">{ join("\n", @CFTEXT) }</font></div><div class=""><font face="Courier New" class="">Content-Type: text/html</font></div><div class=""><font face="Courier New" class="">Content:<pre>{$Tickets{"TOP"}->Transactions->First->Content}</pre></font></div><div class=""><font face="Courier New" class="">ENDOFCONTENT</font></div></div><div class=""><br class=""></div><div class="">LOGS from the <font face="Courier New" class="">foreach()</font> (but not from the <font face="Courier New" class="">while()</font>):</div><div class=""><font face="Courier New" class="">[16779] [Tue Mar 10 06:52:53 2015] [info]: Customer ID (template:8)<br class="">[16779] [Tue Mar 10 06:52:53 2015] [info]: Customer Language (template:8)<br class="">[16779] [Tue Mar 10 06:52:53 2015] [info]: Customer Name (template:8)<br class="">[16779] [Tue Mar 10 06:52:53 2015] [info]: Customer Email (template:8)<br class="">[16779] [Tue Mar 10 06:52:53 2015] [info]: Customer Email Tech (template:8)<br class="">[16779] [Tue Mar 10 06:52:53 2015] [info]: Customer Status (template:8)<br class="">[16779] [Tue Mar 10 06:52:53 2015] [info]: Service Type (template:8)<br class="">[16779] [Tue Mar 10 06:52:53 2015] [info]: Service Status (template:8)<br class="">[16779] [Tue Mar 10 06:52:53 2015] [info]: Device Name (template:8)<br class="">[16779] [Tue Mar 10 06:52:53 2015] [info]: Device Status (template:8)<br class="">[16779] [Tue Mar 10 06:52:53 2015] [info]: Device O/S (template:8)<br class="">[16779] [Tue Mar 10 06:52:53 2015] [info]: Device Control Panel (template:8)<br class="">[16779] [Tue Mar 10 06:52:53 2015] [info]: Customer DBID (template:8)<br class="">[16779] [Tue Mar 10 06:52:53 2015] [info]: Customer Country (template:8)<br class="">[16779] [Tue Mar 10 06:52:53 2015] [info]: Customer Created (template:8)<br class="">[16779] [Tue Mar 10 06:52:53 2015] [info]: Customer Closed (template:8)<br class="">[16779] [Tue Mar 10 06:52:53 2015] [info]: Customer Groups (template:8)<br class="">[16779] [Tue Mar 10 06:52:53 2015] [info]: Customer Ticket Priority (template:8)<br class="">[16779] [Tue Mar 10 06:52:53 2015] [info]: Customer Managed (template:8)<br class="">[16779] [Tue Mar 10 06:52:53 2015] [info]: Customer SystemDB (template:8)<br class="">[16779] [Tue Mar 10 06:52:53 2015] [info]: Service DBID (template:8)<br class="">[16779] [Tue Mar 10 06:52:53 2015] [info]: Service Price (template:8)<br class="">[16779] [Tue Mar 10 06:52:53 2015] [info]: Service Created (template:8)<br class="">[16779] [Tue Mar 10 06:52:53 2015] [info]: Service Closed (template:8)<br class="">[16779] [Tue Mar 10 06:52:53 2015] [info]: Device DBID (template:8)<br class="">[16779] [Tue Mar 10 06:52:53 2015] [info]: Device Created (template:8)<br class="">[16779] [Tue Mar 10 06:52:53 2015] [info]: Device Closed (template:8)<br class="">[16779] [Tue Mar 10 06:52:53 2015] [info]: Device Type (template:8)<br class="">[16779] [Tue Mar 10 06:52:53 2015] [info]: Device Facility (template:8)<br class="">[16779] [Tue Mar 10 06:52:53 2015] [info]: Device Bits (template:8)<br class="">[16779] [Tue Mar 10 06:52:53 2015] [info]: Device Addresses (template:8)</font></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">I've also tried loading the CF using<font face="Courier New" class=""> $Tickets{"TOP"}->LoadCustomFieldByIdentifier($cfname)</font> but this does not work either.</div><div class=""><br class=""></div><div class="">Basically I'm waning to copy a list of CFs from $Tickets{'TOP'} to the newly created one.</div><div class=""><br class=""></div><div class="">Thank you.</div><br class=""><div apple-content-edited="true" class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Landon Stewart : <a href="mailto:lstewart@iweb.com" class="">lstewart@iweb.com</a></div><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Lead Specialist, Abuse and Security Management<br class="">Spécialiste principal, gestion des abus et sécurité<br class=""><a href="http://iweb.com" class="">http://iweb.com</a> : +1 (888) 909-4932</div></div>
</div>
<br class=""></body></html>