[rt-users] Need help referencing custom fields in CreateTicket template
davidturnau
daveturnau at hotmail.com
Thu Aug 23 19:59:35 EDT 2007
You might be on to something. I have a scrip that creates a ticket in my
Hardware queue when a certain field is updated. I want to pull data from the
original ticket (ticket id, custom field value) and populate the template
that is used to create the new ticket. Is my syntax wrong? Is my template
trying to pull the data from fields in a ticket that doesn't exist yet
instead of the original ticket? If so, how do I reference the original
ticket in the perl tag?
I've also used "TOP" in my syntax without any luck. I've seen some
references to it in the forums but I don't really understand what it does or
how to use it.
I've used it with the following syntax:
Subject: {$Ticket{TOP}->FirstCustomFieldValue('Product');}
but I just end up with the same error in rt.log
Gene LeDuc wrote:
>
> 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.
>
> Gene
>
> At 04:20 PM 8/23/2007, davidturnau wrote:
>
>
>>Update:
>>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}
>>and
>>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:
>>http://www.nabble.com/Need-help-referencing-custom-fields-in-CreateTicket-template-tf4320089.html#a12303840
>>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-perl-in-CreateTicket-template-tf4320089.html#a12304265
Sent from the Request Tracker - User mailing list archive at Nabble.com.
More information about the rt-users
mailing list