Hello RT-Users, Nevermind! :-)
I'm doing a chain of RT::Action::CreateTickets and it turns out my problem was that the custom fields were not being set before the Investigation ticket creation and therefor the CF's had no values. Once the issue with that was resolved it all started working perfectly. Landon Stewart : lstew...@iweb.com Lead Specialist, Abuse and Security Management Spécialiste principal, gestion des abus et sécurité http://iweb.com : +1 (888) 909-4932 > On Mar 10, 2015, at 12:15 AM, Landon Stewart <lstew...@iweb.com> wrote: > > Hello, > > It seems that one cannot load the values of a CF with > $Ticket{'TOP'}->CustomFieldValues($fieldname). 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). > > ===Create-Ticket: Investigation > { > my @cflist = [ 'Customfield1', 'Customfield2', 'etc']; > our @CFTEXT; > foreach my $cfname (@cflist) { > RT::Logger->info($cfname); > my $cfvs = $Tickets{"TOP"}->CustomFieldValues($cfname); > while (my $cfv = $cfvs->Next) { > RT::Logger->info($cfname.": ".$cfv->Content); > push @CFTEXT, "CF-".$cfname.": ".$cfv->Content; > } > } > } > Queue: Investigations > Parents: TOP > Status: open > { join("\n", @CFTEXT) } > Content-Type: text/html > Content:<pre>{$Tickets{"TOP"}->Transactions->First->Content}</pre> > ENDOFCONTENT
signature.asc
Description: Message signed with OpenPGP using GPGMail