[rt-users] Get Custom Field Data from ticket to use in an email

IT Guy zachary.neubert at usu.edu
Wed May 14 16:11:08 EDT 2014


This is my template:

Talking about: { my $values = $Ticket->CustomFieldValues('Number');
  my $OUTPUT;
  while ( my $value = $values->Next ) {
    $OUTPUT .= "Here's your value --->";
    $OUTPUT .= $value->Content;
    $OUTPUT .= "<---\n";
  }
  $OUTPUT;
}

This is mostly copied directly from a page on the Request Tracker Wiki,
however, something must have gone wrong on the way. 

I have 3 custom fields, Number, Date Created and Article Body. I was hoping
to extract Number with this template, but I just keep getting emails with
"Talking about: " and that's it. If I put nonsense in the quotes here:

$Ticket->CustomFieldValues('Number')

I get an error in Apache's log telling me the custom field couldn't load
(because it doesn't exist), but I get no such message with 'Number'. I've
double-checked the scrip order to make sure the Custom Fields are filled
before the scrip is called but they are, in fact, in the right order. What
am I doing wrong?



--
View this message in context: http://requesttracker.8502.n7.nabble.com/Get-Custom-Field-Data-from-ticket-to-use-in-an-email-tp57375.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.



More information about the rt-users mailing list