Template to include All ticket content on resolve

Can anyone share with me a template that will include all of the tickets
contents/transactions when resolved? The default resolve template has a URL
link but I do not want my customers going to the URL and I would just like
to include the entire ticket history contents on resolve

Kyle

Ok Here is what I found in the old archives

On resolve it is putting in the “Initial request” content fine but it is not
including the complete ticket history it only shows

Complete Ticket History

And does not show any of the comments or correspondence in the ticket . Can
anyone take a look at my code I have under complete ticket history and
suggest why it is not including the history???Subject: Resolved: {$Ticket->Subject}

Dear customer,

according to our records your issue regarding

“{$Ticket->Subject()}”,

has been resolved in our ticket system.

If you have any further questions or concerns, please reply to this

message to reopen the ticket or email (our email) to open another ticket.

Regards,

Our Name

Your initial request was

{$Ticket->Transactions->First->Content()}

Complete Ticket History

{

my $resolved_transaction;

my $resolved_message = “”;

my $last_content;

my $Transactions = $Ticket->Transactions;

$Transactions->OrderBy;

$Transactions->GotoFirstItem;

while (my $Transaction = $Transactions->Next) {

if ($Transaction->Type eq ‘Correspond’) {

$resolved_transaction = $Transaction;

} elsif (!$Transactions->IsLast) {

$resolved_transaction = undef;

}

if ($resolved_transaction) {

my $attachments = $resolved_transaction->Attachments;

$attachments->GotoFirstItem;

while (my $message = $attachments->Next) {

next unless $message->ContentType =~

m!^(text/plain|message|text$)!i;

my $content = $message->Content;

if ($last_content eq $content) {

$content = undef; }

next unless length $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 ." (".$rtname.")";

$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;

}

Kyle

From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Kyle Thomas
Sent: Monday, June 06, 2011 2:06 PM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Template to include All ticket content on resolve

Can anyone share with me a template that will include all of the tickets
contents/transactions when resolved? The default resolve template has a URL
link but I do not want my customers going to the URL and I would just like
to include the entire ticket history contents on resolve

Kyle

Can anyone share with me a template that will include all of the tickets
contents/transactions when resolved? The default resolve template has a URL
link but I do not want my customers going to the URL and I would just like
to include the entire ticket history contents on resolve

Take a look at:

Best regards, Ruslan.

Yes that is what I used

Can you see my other email I sent

Ok Here is what I found in the old archives

On resolve it is putting in the “Initial request” content fine but it is not
including the complete ticket history it only shows

Complete Ticket History

And does not show any of the comments or correspondence in the ticket . Can
anyone take a look at my code I have under complete ticket history and
suggest why it is not including the history???Subject: Resolved: {$Ticket->Subject}

Dear customer,

according to our records your issue regarding

“{$Ticket->Subject()}”,

has been resolved in our ticket system.

If you have any further questions or concerns, please reply to this

message to reopen the ticket or email (our email) to open another ticket.

Regards,

Our Name

Your initial request was

{$Ticket->Transactions->First->Content()}

Complete Ticket History

{

my $resolved_transaction;

my $resolved_message = “”;

my $last_content;

my $Transactions = $Ticket->Transactions;

$Transactions->OrderBy;

$Transactions->GotoFirstItem;

while (my $Transaction = $Transactions->Next) {

if ($Transaction->Type eq ‘Correspond’) {

$resolved_transaction = $Transaction;

} elsif (!$Transactions->IsLast) {

$resolved_transaction = undef;

}

if ($resolved_transaction) {

my $attachments = $resolved_transaction->Attachments;

$attachments->GotoFirstItem;

while (my $message = $attachments->Next) {

next unless $message->ContentType =~

m!^(text/plain|message|text$)!i;

my $content = $message->Content;

if ($last_content eq $content) {

$content = undef; }

next unless length $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 ." (".$rtname.")";

$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;

}

Kyle

From: ruslan.zakirov@gmail.com [mailto:ruslan.zakirov@gmail.com] On Behalf
Of Ruslan Zakirov
Sent: Monday, June 06, 2011 4:24 PM
To: Kyle Thomas
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Template to include All ticket content on resolve

Can anyone share with me a template that will include all of the tickets
contents/transactions when resolved? The default resolve template has a
URL
link but I do not want my customers going to the URL and I would just like
to include the entire ticket history contents on resolve

Take a look at:

Best regards, Ruslan.

Hi,

Check error logs. Increase logging to debug. Add more debugging to the
template. Nobody touched that page for a while. I don’t recall
complaints.On Tue, Jun 7, 2011 at 12:52 AM, Kyle Thomas kyle@avalontel.com wrote:

Yes that is what I used

Can you see my other email I sent

Ok Here is what I found in the old archives

On resolve it is putting in the “Initial request” content fine but it is not
including the complete ticket history it only shows


Complete Ticket History


And does not show any of the comments or correspondence in the ticket . Can
anyone take a look at my code I have under complete ticket history and
suggest why it is not including the history???

Subject: Resolved: {$Ticket->Subject}

Dear customer,

according to our records your issue regarding

“{$Ticket->Subject()}”,

has been resolved in our ticket system.

If you have any further questions or concerns, please reply to this

message to reopen the ticket or email (our email) to open another ticket.

Regards,

Our Name


Your initial request was


{$Ticket->Transactions->First->Content()}


Complete Ticket History


{

my $resolved_transaction;

my $resolved_message = “”;

my $last_content;

my $Transactions = $Ticket->Transactions;

$Transactions->OrderBy;

$Transactions->GotoFirstItem;

while (my $Transaction = $Transactions->Next) {

if ($Transaction->Type eq ‘Correspond’) {

$resolved_transaction = $Transaction;

} elsif (!$Transactions->IsLast) {

$resolved_transaction = undef;

}

if ($resolved_transaction) {

my $attachments = $resolved_transaction->Attachments;

$attachments->GotoFirstItem;

while (my $message = $attachments->Next) {

next unless $message->ContentType =~

m!^(text/plain|message|text$)!i;

my $content = $message->Content;

if ($last_content eq $content) {

$content = undef; }

next unless length $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 ." (".$rtname.")";

$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;

}

Kyle

-----Original Message-----
From: ruslan.zakirov@gmail.com [mailto:ruslan.zakirov@gmail.com] On Behalf
Of Ruslan Zakirov
Sent: Monday, June 06, 2011 4:24 PM
To: Kyle Thomas
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Template to include All ticket content on resolve

On Mon, Jun 6, 2011 at 10:06 PM, Kyle Thomas kyle@avalontel.com wrote:

Can anyone share with me a template that will include all of the tickets
contents/transactions when resolved? The default resolve template has a
URL
link but I do not want my customers going to the URL and I would just like
to include the entire ticket history contents on resolve

Take a look at:

http://requesttracker.wikia.com/wiki/AddTicketHistoryToMail


Best regards, Ruslan.

Best regards, Ruslan.

Forget it… I don’t care that much and I don’t have time to care that much.
It contains the original issue content of the ticket so that’s good enough
for me right now. Until I can hire a sys admin to take this thing over for
me it will stay like that because I actually have a real network to run. The
system should do this automatically in my opinion by pressing a button and
not having to know perl and do debug for a week… but what do you expect
for something that is free… Its serving its purpose for now and tracking
tickets I guess…

Thanks

KyleFrom: ruslan.zakirov@gmail.com [mailto:ruslan.zakirov@gmail.com] On Behalf
Of Ruslan Zakirov
Sent: Monday, June 06, 2011 5:03 PM
To: Kyle Thomas
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Template to include All ticket content on resolve

Hi,

Check error logs. Increase logging to debug. Add more debugging to the
template. Nobody touched that page for a while. I don’t recall
complaints.

Yes that is what I used

Can you see my other email I sent

Ok Here is what I found in the old archives

On resolve it is putting in the “Initial request” content fine but it is
not
including the complete ticket history it only shows


Complete Ticket History


And does not show any of the comments or correspondence in the ticket .
Can
anyone take a look at my code I have under complete ticket history and
suggest why it is not including the history???

Subject: Resolved: {$Ticket->Subject}

Dear customer,

according to our records your issue regarding

“{$Ticket->Subject()}”,

has been resolved in our ticket system.

If you have any further questions or concerns, please reply to this

message to reopen the ticket or email (our email) to open another ticket.

Regards,

Our Name


Your initial request was


{$Ticket->Transactions->First->Content()}


Complete Ticket History


{

my $resolved_transaction;

my $resolved_message = “”;

my $last_content;

my $Transactions = $Ticket->Transactions;

$Transactions->OrderBy;

$Transactions->GotoFirstItem;

while (my $Transaction = $Transactions->Next) {

if ($Transaction->Type eq ‘Correspond’) {

$resolved_transaction = $Transaction;

} elsif (!$Transactions->IsLast) {

$resolved_transaction = undef;

}

if ($resolved_transaction) {

my $attachments = $resolved_transaction->Attachments;

$attachments->GotoFirstItem;

while (my $message = $attachments->Next) {

next unless $message->ContentType =~

m!^(text/plain|message|text$)!i;

my $content = $message->Content;

if ($last_content eq $content) {

$content = undef; }

next unless length $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 ." (".$rtname.")";

$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;

}

Kyle

-----Original Message-----
From: ruslan.zakirov@gmail.com [mailto:ruslan.zakirov@gmail.com] On Behalf
Of Ruslan Zakirov
Sent: Monday, June 06, 2011 4:24 PM
To: Kyle Thomas
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Template to include All ticket content on resolve

Can anyone share with me a template that will include all of the tickets
contents/transactions when resolved? The default resolve template has a
URL
link but I do not want my customers going to the URL and I would just
like

to include the entire ticket history contents on resolve

Take a look at:

http://requesttracker.wikia.com/wiki/AddTicketHistoryToMail


Best regards, Ruslan.

Best regards, Ruslan.