<html>
<body>
<font size=3>At Monday 2/5/2007 11:58 AM, John Arends wrote:<br>
<blockquote type=cite class=cite cite="">I'm still trying to wrap my head
around the Perl API.<br><br>
I can create a ticket using the following code:<br><br>
my $TicketObj = new RT::Ticket( $RT::SystemUser );<br>
$TicketObj->Create( <x-tab> </x-tab>Queue =>
'General',<br>
<x-tab> </x-tab><x-tab>
</x-tab><x-tab>
</x-tab>Subject =>
'Test Ticket',<br>
<x-tab> </x-tab><x-tab>
</x-tab><x-tab>
</x-tab>Requestor =>
$Requestor );<br><br>
From reading the docs, it looks like the 'body' of a ticket is not
stored with the ticket's record.<br><br>
Is there a good way to append a few lines stored in a string to a ticket
at the time it is created?</blockquote><br>
John,<br><br>
Sounds like you're on the right track. If you look at the Ticket API (
either by running perldoc against Ticket_Overlay.pm, or by looking at
$RTHOME/lib/RT/Ticket_Overlay.pm), you'll see that the Create method can
take a MIMEObj argument, which is a MIME::Entity object. If you create
one of these objects with your text in its body, you can pass it in to
the Ticket->Create method.<br><br>
A good example of this is in the CreateTicket method in
$RTHOME/lib/RT/Interface/Web.pm<br><br>
Steve</font></body>
</html>