CannedReplies

Several people have asked on the mailing list about how to get 'canned replies' to appear in a drop-down list on the reply/comment screen. The idea is to make frequently used responses easily accessible.

RTFM gives this capability.

There may be people who don't need the full power (and overhead) of an RTFM installation. For these folks, here is a simple solution that uses a couple of callbacks to provide a canned-reply feature on the reply/comment screen. It uses RT's templates, so the same variable substitutions can be used. 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.

Contents

One drawback of the original CannedReplies was that it showed all templates in the dropdown. Originally this was fine for our environment, but as we began using RT for more things, and the pool of privileged users became less technical, there was a call to filter out the templates that were not canned replies. This is what I did meet that goal. All of my work is based off of the original done by Stephen Turner(MIT).

Like the original, you use RT's templates to create your canned-replies. so the same variable substitutions can be used. You can create your canned-replies as a global template (A canned-reply for use in every queue) or just within the queue (A canned-reply for use in just the one queue). The difference in this setup from the original is that it will limit what is shown to the end-user based on the description of the template. When creating a canned-reply, you will need to make your description begin with "Canned Reply" (case sensitive). This can be altered (Non-English languages for example) by modifying the "STARTSWITH" option in the SelectCannedReply file.

I really liked the original idea, but I did not like how it was displayed. I wanted the words "Canned reply:" to be directly above the word "Message" and the templates selection and submit button to line up with the other input boxes.

This uses the original's MessageBox callback, but instead of local/html/Callbacks/Indirection/Ticket/Update.html/BeforeMessageBox we use local/html/Callbacks/Indirection/Ticket/Update.html/BeforeUpdateType with: