Canned Responses

In RT Wiki, Steve Turner has posted, Apr. 6th, 2006, code for canned
responses in two Callback files.

I am new to RT and need assistance for the following:

What is meant by:

…/local/html/Callbacks//Ticket/

for I do not see the Callbacks folder in ver. 3.6.3. Do I just create
it, and stands for any name of my choosing?
Would this be global, or can it be queue specific and how?
Will it use canned response templates already set-up, global and/or
queue specific? Or need to create new template files in specific
directory?

Thank you,
Kamber Dalal

In RT Wiki, Steve Turner has posted, Apr. 6th, 2006, code for canned
responses in two Callback files.

I am new to RT and need assistance for the following:

What is meant by:

…/local/html/Callbacks//Ticket/

for I do not see the Callbacks folder in ver. 3.6.3. Do I just create
it, and stands for any name of my choosing?
Would this be global, or can it be queue specific and how?
Will it use canned response templates already set-up, global and/or
queue specific? Or need to create new template files in specific
directory?

Thank you,
Kamber Dalal

At Wednesday 2/21/2007 11:55 AM, Dalal, Kamber Z (Kamber) wrote:

In RT Wiki, Steve Turner has posted, Apr. 6th, 2006, code for
canned responses in two Callback files.

I am new to RT and need assistance for the following:

What is meant by:

…/local/html/Callbacks//Ticket/

for I do not see the Callbacks folder in ver. 3.6.3. Do I just
create it, and stands for any name of my choosing?
Would this be global, or can it be queue specific and how?
Will it use canned response templates already set-up, global and/or
queue specific? Or need to create new template files in specific directory?

Thank you,
Kamber Dalal

Hello Kamber,

Yes, you are correct - you should create the directory yourself, and
can be any name you like. Make sure the directories &
files you create are readable by the web server.

The code in the wiki will show any queue-specific templates you have
already set up (for the ticket’s queue)

Thanks,
Steve

At Wednesday 2/21/2007 03:35 PM, Dalal, Kamber Z (Kamber) wrote:

Steve,

Thank you for the assistance. Please excuse my ignorance,

In the wiki you mentioned:
“One limitation is that the transaction object can’t be used in the
template - I just pass in a blank transaction object to the template
parsing routine.”

I believe that is what is now in the way. In one of the templates the
first line of the content is:
Subject: Notify: ($Ticket->Subject)

And in the second template’s content I left the first 3 lines blank.

What do you mean by “I just pass in a blank transaction object to the
template parsing routine.”

Thank you,
Kamber

Kamber,

In the usual RT usage of templates (i.e. in creating email messages),
there’s a transaction object available to the template, and it’s
referenced by $Transaction.

In my canned replies code, there is no associated transaction - the
code is executed in the context of a ticket, not a transaction.
However, the Template->parse() method expects a transaction object as
an argument. So I create a blank, or empty, transaction object and
pass that in:

my $trans = new RT::Transaction( $session{‘CurrentUser’} );

$template->Parse(TicketObj => $TicketObj,
TransactionObj => $trans);

So you should be fine as long as you don’t use $Transaction in the templates.

Steve