MailtoLinksFromTransactions

From Request Tracker Wiki
Revision as of 04:14, 5 June 2013 by 158.38.62.12 (talk)
Jump to navigation Jump to search

I hate using a web browser for composing mail. I much prefer to use my regular email client when responding to RT tickets. However, browsing ticket history is better done in a web brower. I wanted to combine these needs.

Using the brilliant callback-mechanism in RT, I insert some mailto hyperlinks at the top of each Transaction in RT, when clicked, an email response is generated in my email client ready to be edited.

I simply created the file /html/Callbacks/COMPANY/Ticket/Elements/ShowTransaction/AfterDescription in my local RT directory:

% if ($Transaction->Type eq 'Correspond' or $Transaction->Type eq 'Comment' or $Transaction->Type eq 'Create') {

| Email reply

| Email comment

% }

<%init>

my $Ticket = $Transaction->TicketObj;

my $subject = "[".$RT::Config->Get('rtname')." #".$Ticket->Id."] ".$Ticket->Subject; my $content = $Transaction->Content('Quote' => 1, 'Wrap' => 75, 'Type' => 'text/plain');

my $message_id = $Transaction->Message->First->GetHeader ('Message-ID') if $Transaction->Message->First;

<%args>

$Transaction