Autoreply Template Error

I’ve created a custom autoreply but seem to be getting an error in the logs when a ticket is created. No autoreply message is being sent.

From the logs, I’ve worked out that this section of the template is causing problems:

Your ticket has been given a {$Ticket->Priority < 40 ? “Low priority. There is no fixed response time for this priority, but we will respond as time allows” : $Transaction->Priority < 80 ? “Medium priority. We will respond by the end of the next working day” : $Transaction->Priority < 100 ? “High priority. We will respond within 6 working hours” : “Critical priority. We will respond within 2 working hours”}. If you require a response before that time, please call the Maintenance Support number.

The error I am getting is:

Oct 26 10:36:57 helpdesk RT: Template parsing error: RT::Transaction::Priority Unimplemented in Text::Template::GEN13. (template line 10) Stack: [/usr/lib/perl5/site_perl/5.8.8/DBIx/SearchBuilder/Record.pm:495] [template:10] [/opt/rt3/bin/…/lib/RT/Template_Overlay.pm:425] [/opt/rt3/bin/…/lib/RT/Template_Overlay.pm:332] [/opt/rt3/bin/…/lib/RT/Template_Overlay.pm:312] [/opt/rt3/bin/…/lib/RT/Action/SendEmail.pm:155] [/opt/rt3/bin/…/lib/RT/Action/Autoreply.pm:66] [/opt/rt3/bin/…/lib/RT/ScripAction_Overlay.pm:230] [/opt/rt3/bin/…/lib/RT/Scrip_Overlay.pm:448] [/opt/rt3/bin/…/lib/RT/Scrips_Overlay.pm:240] [/opt/rt3/bin/…/lib/RT/Transaction_Overlay.pm:169] [/opt/rt3/bin/…/lib/RT/Record.pm:1457] [/opt/rt3/bin/…/lib/RT/Ticket_Overlay.pm:660] [/opt/rt3/bin/…/lib/RT/Interface/Web.pm:1042] [/opt/rt3/share/html/Ticket/Display.html:117] [/opt/rt3/share/html/Ticket/Create.html:419] [/opt/rt3/bin/…/lib/RT/Interface/Web.pm:320] [/opt/rt3/bin/…/lib/RT/Interface/Web.pm:224] [/op

I have another scrip / template that sends out a message when the priority is changed and it works okay, although that template uses $Ticket->OldValue and $Ticket->NewValue as opposed to $Ticket->Priority.

If I understand it correctly, the priority isn’t implemted when a new ticket is created? Can anybody shed any light on why this is happening and how to resolve it?

Kind regards,

Paul Broadwith (MBCS)

Microsoft Certified Professional

Blue Ivy Ltd - Microsoft Small Business Specialist, UK Partner Qualified for 2010 and Microsoft Registered Partner

Tel.: 0845 862 0292

Web: http://www.blueivy.co.uk http://www.blueivy.co.uk

Hi,

You have $Transaction->Priority when it should be $Ticket->Priority.

Regards, Ruslan. From phone.

написал:

I’ve created a custom autoreply but seem to be getting an error in the
logs when a ticket is created. No autoreply message is being sent.

From the logs, I’ve worked out that this section of the template is
causing problems:

===

Your ticket has been given a {$Ticket->Priority < 40 ? “Low priority.
There is no fixed response time for this priority, but we will respond as
time allows” : $Transaction->Priority < 80 ? “Medium priority. We will
respond by the end of the next working day” : $Transaction->Priority < 100 ?
“High priority. We will respond within 6 working hours” : “Critical
priority. We will respond within 2 working hours”}. If you require a
response before that time, please call the Maintenance Support number.

===

The error I am getting is:

===

Oct 26 10:36:57 helpdesk RT: Template parsing error:
RT::Transaction::Priority Unimplemented in Text::Template::GEN13. (template
line 10) Stack:
[/usr/lib/perl5/site_perl/5.8.8/DBIx/SearchBuilder/Record.pm:495]
[template:10] [/opt/rt3/bin/…/lib/RT/Template_Overlay.pm:425]
[/opt/rt3/bin/…/lib/RT/Template_Overlay.pm:332]
[/opt/rt3/bin/…/lib/RT/Template_Overlay.pm:312]
[/opt/rt3/bin/…/lib/RT/Action/SendEmail.pm:155]
[/opt/rt3/bin/…/lib/RT/Action/Autoreply.pm:66]
[/opt/rt3/bin/…/lib/RT/ScripAction_Overlay.pm:230]
[/opt/rt3/bin/…/lib/RT/Scrip_Overlay.pm:448]
[/opt/rt3/bin/…/lib/RT/Scrips_Overlay.pm:240]
[/opt/rt3/bin/…/lib/RT/Transaction_Overlay.pm:169]
[/opt/rt3/bin/…/lib/RT/Record.pm:1457]
[/opt/rt3/bin/…/lib/RT/Ticket_Overlay.pm:660]
[/opt/rt3/bin/…/lib/RT/Interface/Web.pm:1042]
[/opt/rt3/share/html/Ticket/Display.html:117]
[/opt/rt3/share/html/Ticket/Create.html:419]
[/opt/rt3/bin/…/lib/RT/Interface/Web.pm:320]
[/opt/rt3/bin/…/lib/RT/Interface/Web.pm:224] [/op

===

I have another scrip / template that sends out a message when the priority
is changed and it works okay, although that template uses $Ticket->OldValue
and $Ticket->NewValue as opposed to $Ticket->Priority.

If I understand it correctly, the priority isn’t implemted when a new
ticket is created? Can anybody shed any light on why this is happening and
how to resolve it?

Kind regards,

Paul Broadwith (MBCS)

Microsoft Certified Professional

Blue Ivy Ltd - Microsoft Small Business Specialist, UK Partner Qualified
for 2010 and Microsoft Registered Partner

ARRGGH!! Thanks for spotting that. I couldn’t see it for looking at it! The first one was correct, the others were wrong!

Kind regards,

Paul Broadwith (MBCS)

Microsoft Certified Professional

Blue Ivy Ltd - Microsoft Small Business Specialist, UK Partner Qualified for 2010 and Microsoft Registered Partner

Tel.: 0845 862 0292

Web: http://www.blueivy.co.ukFrom: ruslan.zakirov@gmail.com [mailto:ruslan.zakirov@gmail.com] On Behalf Of Ruslan Zakirov
Sent: 27 October 2010 12:09
To: Paul Broadwith
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Autoreply Template Error

Hi,

You have $Transaction->Priority when it should be $Ticket->Priority.

Regards, Ruslan. From phone.