[rt-users] RT3 + Stock Answers

Nathan Evans nevans at fedex.com
Mon Mar 1 19:18:37 EST 2004


I needed the stock answers (Canned Response) functionality from RT2 in
RT3. Since the add-on had not been created yet, here is a quick hack to
insert "Stock Answers" into RT3.

I basically copied the two files (StockAnswers.html & ShowStockAnswers)
from my old RT2 installation and with a few minor tweaks I was able to
make it work on RT3.

Here is how it went:

Copy the webpage that updates the ticket to your local directory:
cp <RT_DIR>/share/html/Ticket/Update.html
<RT_DIR>/local/html/Ticket/Update.html


Next add the following line just below the code that creates the "Update
Type:" dropdown box (about line 74) or where ever you want the dropdown
box to appear.

<tr><td align=right>Stock Answer:</td><td><& /Ticket/ShowStockAnswers,
Queue => $TicketObj->QueueObj->Name &></td></tr>


Copy StockAnswers.html & ShowStockAnswers  (from your RT2 install or
download it from the contrib di) into the same directory as above 
(<RT_DIR>/local/html/Ticket/)

edit ShowStockAnswers, change line 59
from:
my $templateDir="$RT::MasonLocalComponentRoot/../../templates/";
to:
my $templateDir="$RT::MasonLocalComponentRoot/../templates/";

copy your stock answers (from RT2 install) to:
<RT_DIR>/local/templates/<queue_name>/<stock_answer>

That did it for me.

Enjoy

Nathan Evans



More information about the rt-users mailing list