[rt-users] Need help referencing custom fields in CreateTicket template

Gene LeDuc gleduc at mail.sdsu.edu
Thu Aug 23 19:33:27 EDT 2007

Hi David,

I've never used a template to create a ticket so I might be off base 
here.  Does $Ticket exist within a Create Ticket template?  It seems tome 
that it might not until after the ticket has been created.  If it doesn't 
exist yet, that would explain the undefined value ($Ticket).  Just a thought.


At 04:20 PM 8/23/2007, davidturnau wrote:

>This is no longer a custom fields issue. Everything works fine with text but
>I can't call perl in the template at all (it seems)
>I have changed the subject line to:
>  Subject: {$Ticket->id}
>Subject: {$Ticket->id()}
>and got the following error in rt.log each time:
>Subject: Can't call method "id" on an undefined value at template line 2.
>  -dt
>davidturnau wrote:
> >
> > I have a Create Ticket scrip that works until I try to reference a custom
> > field. The template looks like this:
> >
> > ===Create-Ticket: hardware
> > Queue: Hardware
> > Subject: {$Ticket->FirstCustomFieldValue('Product');}
> >
> > The Custom Field "Product" exists and is applied to queue that the scrip
> > is running in. I have set the 'see', 'modify' and 'admin' rights for
> > everyone.
> >
> > The worst part is that this was working fine yesterday and today it is
> > failing. I have tried many options to set this value that I have found on
> > this mailing list and I still can't get it to work.
> >
> > My RT version is 3.4.4
> > My server is running Ubuntu 6.10
> > The syslog error is:
> > Aug 23 13:08:29 support-server RT: Exiting subroutine via next at
> > /usr/share/request-tracker3.4/lib/RT/Action/CreateTickets.pm line 980.
> > (/usr/share/request-tracker3.4/lib/RT.pm:287)
> >
> > Any suggestions would be greatly appreciated.
> >
>View this message in context: 
>Sent from the Request Tracker - User mailing list archive at Nabble.com.
>Community help: http://wiki.bestpractical.com
>Commercial support: sales at bestpractical.com
>Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
>Buy a copy at http://rtbook.bestpractical.com

Gene LeDuc, GSEC
Security Analyst
San Diego State University 

More information about the rt-users mailing list