[rt-users] Grabbing CF's from ticket

Barry L. Kline blkline at attglobal.net
Wed Jul 5 11:59:26 EDT 2006

Ben Blakely wrote:

> I have a ticket queue with a bunch of CF's wrapped around it. What im
> trying to do is, on creation of that ticket, I want to dump all the
> custom field values into the email using a template that creates an
> approval ticket. All that stuff is done, but im not to sure  how to grab
> the values from the cf's and put them into the approval ticket.

I use this code, which is simply code I pulled from the RT wiki site:

{ my $values = $Ticket->CustomFieldValues('Vendor Ref Num');
  my $OUTPUT;
  while ( my $value = $values->Next ) {
    $OUTPUT .= "Your reference number: ";
    $OUTPUT .= $value->Content;
    $OUTPUT .= "\n";

In my case there can be multiple vendor reference number so I put them
into the e-mail one per line.  I put this code into a custom
correspondence template.


More information about the rt-users mailing list