[rt-users] Help -- how to get message bodies from $Ticket object?
Victor Danilchenko
danilche at cs.umass.edu
Thu Jul 31 10:35:25 EDT 2003
Well, i finally -- after looking through the SQL table structure
-- solved it. As is often the case, most of the answer was figuring out
the right question.
the following code in the template did the trick (it's
unfinished -- no error handling yet):
{ my $tlist=$Ticket->Transactions();
my $trans=$tlist->First();
$tlist->GotoFirstItem();
while (my $t=$tlist->Next()){
$trans=$t if $t->Type =~ /correspond/i;
}
my $message=$trans->Attachments()->First()->Content();
"-------------------------------------------------------\n".
"Last correspondence was:\n\n".$message;
}
--
| Victor Danilchenko | You cannot apply a technological |
| danilche at cs.umass.edu | solution to a sociological problem. |
| CSCF | 5-4231 | Edwards' Law |
More information about the rt-users
mailing list