[rt-users] Need help referencing custom fields in CreateTicket template
davidturnau
daveturnau at hotmail.com
Thu Aug 23 19:10:01 EDT 2007
Thanks Gene. I had some problems figuring out my permissions on rt.log
which is why I didn't set that at first and include the info. I've got that
straight now. The results of the log are below but I think the pertinent
line is:
Subject: Can't call method "FirstCustomFieldValue" on an undefined value at
template line 2.
I don't understand why that value is "undefined". The custom field is named
"Product" (capitalized and spelled correctly).
-dt
[Thu Aug 23 23:00:18 2007] [debug]: About to think about scrips for
transaction #44161
(/usr/share/request-tracker3.4/lib/RT/Transaction_Overlay.pm:156)
[Thu Aug 23 23:00:18 2007] [debug]: About to prepare scrips for transaction
#44161 (/usr/share/request-tracker3.4/lib/RT/Transaction_Overlay.pm:160)
[Thu Aug 23 23:00:18 2007] [debug]: Found 7 scrips
(/usr/share/request-tracker3.4/lib/RT/Scrips_Overlay.pm:356)
[Thu Aug 23 23:00:18 2007] [debug]: Line: ===
(/usr/share/request-tracker3.4/lib/RT/Action/CreateTickets.pm:774)
[Thu Aug 23 23:00:18 2007] [debug]: Line: ===Create-Ticket: hardware
(/usr/share/request-tracker3.4/lib/RT/Action/CreateTickets.pm:777)
[Thu Aug 23 23:00:18 2007] [debug]: **** Create ticket: create-hardware
(/usr/share/request-tracker3.4/lib/RT/Action/CreateTickets.pm:791)
[Thu Aug 23 23:00:18 2007] [debug]: Line: Queue: Hardware
(/usr/share/request-tracker3.4/lib/RT/Action/CreateTickets.pm:777)
[Thu Aug 23 23:00:18 2007] [debug]: Line: Subject:
{$Ticket->FirstCustomFieldValue('Product');},
(/usr/share/request-tracker3.4/lib/RT/Action/CreateTickets.pm:777)
[Thu Aug 23 23:00:18 2007] [debug]: About to commit scrips for transaction
#44161 (/usr/share/request-tracker3.4/lib/RT/Transaction_Overlay.pm:169)
[Thu Aug 23 23:00:18 2007] [debug]: In CreateByTemplate
(/usr/share/request-tracker3.4/lib/RT/Action/CreateTickets.pm:561)
[Thu Aug 23 23:00:18 2007] [debug]: Workflow: processing create-hardware of
RT::Ticket=HASH(0xd4e7fc4)
(/usr/share/request-tracker3.4/lib/RT/Action/CreateTickets.pm:576)
[Thu Aug 23 23:00:18 2007] [debug]: Workflow: evaluating
Queue: Hardware
Subject: {$Ticket->FirstCustomFieldValue('Product');},
(/usr/share/request-tracker3.4/lib/RT/Action/CreateTickets.pm:955)
[Thu Aug 23 23:00:18 2007] [debug]: Workflow: yielding
Queue: Hardware
Subject: Can't call method "FirstCustomFieldValue" on an undefined value at
template line 2.
Stack:
[template:2]
[/usr/share/request-tracker3.4/lib/RT/Action/CreateTickets.pm:969]
[/usr/share/request-tracker3.4/lib/RT/Action/CreateTickets.pm:582]
[/usr/share/request-tracker3.4/lib/RT/Action/CreateTickets.pm:522]
[/usr/share/request-tracker3.4/lib/RT/ScripAction_Overlay.pm:241]
[/usr/share/request-tracker3.4/lib/RT/Scrip_Overlay.pm:507]
[/usr/share/request-tracker3.4/lib/RT/Scrips_Overlay.pm:192]
[/usr/share/request-tracker3.4/lib/RT/Transaction_Overlay.pm:170]
[/usr/share/request-tracker3.4/lib/RT/Record.pm:1431]
[/usr/share/request-tracker3.4/lib/RT/Record.pm:1661]
[/usr/share/request-tracker3.4/lib/RT/Record.pm:1565]
[/usr/share/request-tracker3.4/lib/RT/Interface/Web.pm:1239]
[/usr/share/request-tracker3.4/html/Ticket/Modify.html:71]
[/usr/share/request-tracker3.4/html/autohandler:215]
,
(/usr/share/request-tracker3.4/lib/RT/Action/CreateTickets.pm:971)
[Thu Aug 23 23:00:18 2007] [error]: Ticket creation failed: Can't call
method "FirstCustomFieldValue" on an undefined value at template line 2.
Stack:
[template:2]
[/usr/share/request-tracker3.4/lib/RT/Action/CreateTickets.pm:969]
[/usr/share/request-tracker3.4/lib/RT/Action/CreateTickets.pm:582]
[/usr/share/request-tracker3.4/lib/RT/Action/CreateTickets.pm:522]
[/usr/share/request-tracker3.4/lib/RT/ScripAction_Overlay.pm:241]
[/usr/share/request-tracker3.4/lib/RT/Scrip_Overlay.pm:507]
[/usr/share/request-tracker3.4/lib/RT/Scrips_Overlay.pm:192]
[/usr/share/request-tracker3.4/lib/RT/Transaction_Overlay.pm:170]
[/usr/share/request-tracker3.4/lib/RT/Record.pm:1431]
[/usr/share/request-tracker3.4/lib/RT/Record.pm:1661]
[/usr/share/request-tracker3.4/lib/RT/Record.pm:1565]
[/usr/share/request-tracker3.4/lib/RT/Interface/Web.pm:1239]
[/usr/share/request-tracker3.4/html/Ticket/Modify.html:71]
[/usr/share/request-tracker3.4/html/autohandler:215]
(/usr/share/request-tracker3.4/lib/RT/Action/CreateTickets.pm:974)
[Thu Aug 23 23:00:18 2007] [warning]: 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)
Gene LeDuc wrote:
>
> Hi David,
>
> Try turning your logging level up to Debug (in RT_SiteConfig.pm) and then
> see what turns up in rt.log. Remember to restart your web server so the
> change takes effect.
>
> Regards,
> Gene
>
> At 03:09 PM 8/23/2007, 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:
>>http://www.nabble.com/Need-help-referencing-custom-fields-in-CreateTicket-template-tf4320089.html#a12302188
>>Sent from the Request Tracker - User mailing list archive at Nabble.com.
>>
>>_______________________________________________
>>http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>>
>>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
>
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> 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
>
>
--
View this message in context: http://www.nabble.com/Need-help-referencing-custom-fields-in-CreateTicket-template-tf4320089.html#a12303794
Sent from the Request Tracker - User mailing list archive at Nabble.com.
More information about the rt-users
mailing list