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

Kevin Falcone falcone at bestpractical.com
Thu May 15 16:16:54 EDT 2014


On Wed, May 14, 2014 at 01:11:08PM -0700, IT Guy wrote:
> 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. 

A more modern wiki page would likely have suggested
FirstCustomFieldValue('Number') or CustomFieldValuesAsString('Number')
http://bestpractical.com/docs/rt/latest/RT/Record.html#FirstCustomFieldValue-FIELD

Both of these are available on the $Ticket object.

-kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 235 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20140515/d0f90dc7/attachment.sig>


More information about the rt-users mailing list