Thank you for your reply.
I have seen this solution in the wiki but it is not what I want to do. I
want to include the ticket history in the message that is sent when you are
on the Update.html page and choose the Resolve link, and finally write some
information in the message area. The update type is set to Reply to
requestors.
The solution I have come up with so far is to modify the Update.html page so
that it passes the ticket history to the message area that displays it
(overwrite Elements/MessageArea). It currently works but it is a rather ugly
solution.
Another way to solve the problem would be to make sure that the Update.html
page doesnt send any emails to the requestors and then use an
OnResolveTemplate as Torsten purposed. Im not sure whats best.
Regards
Marie Gellbäck
Developer
Från: Torsten Brumm [mailto:torsten.brumm@kuehne-nagel.com]
Skickat: den 11 juli 2006 16:29
Till: ‘Marie Gellbäck’; rt-users@lists.bestpractical.com
Ämne: AW: [rt-users] Ticket history in ticket resolved message
Hi Marie,
there was an acrticle on the wiki:
http://wiki.bestpractical.com/index.cgi?AddTicketHistoryToMail
but it is removed from dumb spammers.
Here is a copy:
AddTicketHistoryToMail
Original author: Michael Markstaller - IFCO
Code cleanups: RuslanZakirov
Require: Text::Wrapper perl moduleSubject: Resolved: {$Ticket->Subject}
Dear customer,
your issue regarding
"{$Ticket->Subject()}",
has been resolved in our ticket system. See below for history of this
ticket.
If you have any further questions or concerns, please reply to this
message to reopen the ticket.
regards
{$Ticket->OwnerObj->RealName || $Ticket->OwnerObj->Name}
your-company-fooprint
Your initial request was
{$Ticket->Transactions->First->Content()}
Complete Ticket History
{
my $resolved_message = ‘’;
my $last_content = ‘’;
my $transactions = $Ticket->Transactions;
$transactions->Limit( FIELD => ‘Type’, VALUE => ‘Correspond’ );
while (my $transaction = $transactions->Next) {
my $attachments = $transaction->Attachments;
while (my $message = $attachments->Next) {
next unless $message->ContentType =~
m!^(text/plain|message|text$)!i;
my $content = $message->Content;
next unless $content;
next if $last_content eq $content;
$last_content = $content;
my $subject = ($message->Subject || $Ticket->Subject);
my $wrapper = Text::Wrapper->new(columns=>70);
$content = $wrapper->wrap($content);
$resolved_message .= "Subject: ";
$resolved_message .= $subject;
$resolved_message .= "\n";
$resolved_message .= "From: ";
$resolved_message .= $message->CreatorObj->RealName ||
$message->CreatorObj->EmailAddress;
$resolved_message .= "\n";
$resolved_message .= "Time: ";
$resolved_message .= $message->CreatedObj->AsString;
$resolved_message .= "\n";
$resolved_message .= "\n";
$resolved_message .= "$content\n";
$resolved_message .=
“------------------------------------------------\n”;
}
}
$resolved_message;
}
Common Information
There is no need to reply to this message unless you want to RE-OPEN your
ticket with ID [{$rtname} #{$Ticket->id}].
If you want to simply add a COMMENT to this ticket whithout re-opening the
ticket, click below:
mailto:rt-comment@yourdomain.com?subject=[{$rtname}%20#{$Ticket->id()}]&body
=%20
Please note:
-
ALWAYS include the string [{$rtname} #{$Ticket->id}] in the subject line
of all future correspondence about this issue.
-
Do NOT attach or include the content of previous emails already sent to
you by rt.
Von: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] Im Auftrag von Marie
Gellbäck
Gesendet: Dienstag, 11. Juli 2006 09:52
An: rt-users@lists.bestpractical.com
Betreff: [rt-users] Ticket history in ticket resolved message
Hello,
Im using RT 3.4.
I would like to include the initial ticket question in the message that is
sent to the requestor when his ticket has been resolved. The problem is that
I dont want to use an OnResolved template because that would generate two
emails to the requestor (template message + resolve message). So what I want
to do is to add $Ticket->Transactions->First->Content() to the message area
on the Update.html page. But the message area is included
(Elements/MessageBox) so if I add the ticket history text to the MessageBox
all message boxes will display the ticket history.
There is an argument, UpdateContent, defined in Update.html that is passed
on to the MessageBox, does anyone know if/how I can add my ticket history
text to that argument?
I have searched the wiki and the mailing list but I cant find any similar
problems, but maybe Im looking for a bad solution. Any tips or hints in the
correct direction would be appreciated.
Best regards
Marie Gellbäck
Developer