Hi,
I wonder if anyone have a clue how to send a reply containing all of the
comments in the hostory of the ticket ?
/Cheers,
Patrick
Hi,
I wonder if anyone have a clue how to send a reply containing all of the
comments in the hostory of the ticket ?
/Cheers,
Patrick
I wonder if anyone have a clue how to send a reply containing all of the
comments in the hostory of the ticket ?
Get all your users to switch to Outlook or Notes?
(Personally I’d like a solution that goes the other way – if RT records
all the history, it doesn’t need to be in each email. I suppose doing a
multipart MIME digest would be a reasonable [if complex] compromise…)
Chris Devers
I wonder if anyone have a clue how to send a reply containing all of
the comments in the hostory of the ticket ?
Getting all the transactions for a ticket is pretty simple; take a look
at ShowHistory and ShowTransaction in WebRT/html/Tickets/Elements to get
started. This will list all comments attached to ticket $Id:
(my $Ticket = RT::Ticket->new($session{‘CurrentUser’}))->Load($Id);
my $Transactions = $Ticket->Transactions
while (my $Transaction = $Transactions->Next) {
next unless $Transaction->Type eq ‘Comment’;
printf "Subject: %s", $Transaction->Subject;
my $Attachments = $Transaction->Attachments;
$Attachments->GotoFirstItem;
while (my $attachment = $Attachments->Next) {
printf "Content:\n%s\n", $attachment->Content;
}
print "\n"; # separator, for good measure.
}
Wrap that in the appropriate markup, and you’ve got a list of comments
on a ticket.
(darren)
OCCAM’S ERASER:
The philosophical principle that even the simplest solution is bound
to have something wrong with it.