<div class="gmail_extra">Thanks. šFound the code in RT/Interface/Web and adapted it like so:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra"><span class="Apple-tab-span" style="white-space:pre"> </span># Get the Master Ticket's creation text</div>
<div class="gmail_extra"><span class="Apple-tab-span" style="white-space:pre"> </span>my $attachments = RT::Attachments->new(RT->SystemUser);</div><div class="gmail_extra"><span class="Apple-tab-span" style="white-space:pre"> </span>$attachments->LimitByTicket($ticket->id);</div>
<div class="gmail_extra"><span class="Apple-tab-span" style="white-space:pre"> </span>$attachments->Limit( ALIAS š š=> $attachments->TransactionAlias,</div><div class="gmail_extra"><span class="Apple-tab-span" style="white-space:pre"> </span> FIELD š š=> 'Type',</div>
<div class="gmail_extra"><span class="Apple-tab-span" style="white-space:pre"> </span> OPERATOR => '=',</div><div class="gmail_extra"><span class="Apple-tab-span" style="white-space:pre"> </span> VALUE š š=> 'Create',</div>
<div class="gmail_extra"><span class="Apple-tab-span" style="white-space:pre"> </span> ENTRYAGGREGATOR => 'OR',</div><div class="gmail_extra"><span class="Apple-tab-span" style="white-space:pre"> </span> CASESENSITIVE š => 1</div>
<div class="gmail_extra"><span class="Apple-tab-span" style="white-space:pre"> </span> š );</div><div class="gmail_extra"><br></div><div class="gmail_extra"><span class="Apple-tab-span" style="white-space:pre"> </span>my $mimeObj;</div>
<div class="gmail_extra"><br></div><div class="gmail_extra"><span class="Apple-tab-span" style="white-space:pre"> </span>while (my $att = $attachments->Next) {</div><div class="gmail_extra"><span class="Apple-tab-span" style="white-space:pre"> </span>$mimeObj = MIME::Entity->build(</div>
<div class="gmail_extra"><span class="Apple-tab-span" style="white-space:pre"> </span>Type<span class="Apple-tab-span" style="white-space:pre"> </span>=><span class="Apple-tab-span" style="white-space:pre"> </span>'multipart/mixed',</div>
<div class="gmail_extra"><span class="Apple-tab-span" style="white-space:pre"> </span>'Message-Id'<span class="Apple-tab-span" style="white-space:pre"> </span>=><span class="Apple-tab-span" style="white-space:pre"> </span>RT::Interface::Email::GenMessageId,</div>
<div class="gmail_extra"><span class="Apple-tab-span" style="white-space:pre"> </span>Subject<span class="Apple-tab-span" style="white-space:pre"> </span>=> $att->Subject</div><div class="gmail_extra"><span class="Apple-tab-span" style="white-space:pre"> </span>);</div>
<div class="gmail_extra"><span class="Apple-tab-span" style="white-space:pre"> </span>$mimeObj->attach(</div><div class="gmail_extra"><span class="Apple-tab-span" style="white-space:pre"> </span>Type<span class="Apple-tab-span" style="white-space:pre"> </span>=><span class="Apple-tab-span" style="white-space:pre"> </span>$att->ContentType,</div>
<div class="gmail_extra"><span class="Apple-tab-span" style="white-space:pre"> </span>Charset<span class="Apple-tab-span" style="white-space:pre"> </span>=><span class="Apple-tab-span" style="white-space:pre"> </span>'UTF-8',</div>
<div class="gmail_extra"><span class="Apple-tab-span" style="white-space:pre"> </span>Data<span class="Apple-tab-span" style="white-space:pre"> </span>=><span class="Apple-tab-span" style="white-space:pre"> </span>$att->Content);</div>
<div class="gmail_extra"><span class="Apple-tab-span" style="white-space:pre"> </span>$mimeObj->make_singlepart;</div><div class="gmail_extra"><span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div><br>
</div><div>Thanks.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 25, 2012 at 1:45 AM, Ruslan Zakirov <span dir="ltr"><<a href="mailto:ruslan.zakirov@gmail.com" target="_blank">ruslan.zakirov@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p>Create takes content as MIME::Entity object. Steal examples from Comment and/or MakeMimeEntity functions.<br></p>
<p>Ruslan from phone.</p>
<div class="gmail_quote"><a href="tel:24.04.2012%2022" value="+12404201222" target="_blank">24.04.2012 22</a>:42 ÐÏÌØÚÏ×ÁÔÅÌØ "Paul Tomblin" <<a href="mailto:ptomblin@xcski.com" target="_blank">ptomblin@xcski.com</a>> ÎÁÐÉÓÁÌ:<div>
<div class="h5"><br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
When I'm creating a ticket with RT::Ticket api, how do I set the text that goes into the box that says ""Describe the Issue below"? šIt appears to end up as an attachment, and I can retrieve it from an existing ticket usingš<div>
<br clear="all"><div><div>my $attachments = RT::Attachments->new(RT->SystemUser);</div><div>$attachments->LimitByTicket($tik->id);</div><div><br></div><div>foreach my $type (qw(Create Comment Correspond)) {</div>
<div><span style="white-space:pre-wrap"> </span>$attachments->Limit( ALIAS š š=> $attachments->TransactionAlias,</div><div><span style="white-space:pre-wrap"> </span> FIELD š š=> 'Type',</div>
<div><span style="white-space:pre-wrap"> </span> OPERATOR => '=',</div><div><span style="white-space:pre-wrap"> </span> VALUE š š=> $type,</div><div><span style="white-space:pre-wrap"> </span> ENTRYAGGREGATOR => 'OR',</div>
<div><span style="white-space:pre-wrap"> </span> CASESENSITIVE š => 1</div><div><span style="white-space:pre-wrap"> </span> š );</div><div>}</div></div><div><br></div><div>I tried adding it with $ticket->_CreateNote, but then I end up with two "The RT System itself - Ticket created" records.</div>
<div><br></div>-- <br><a href="http://www.linkedin.com/in/paultomblin" target="_blank">http://www.linkedin.com/in/paultomblin</a><br><a href="http://careers.stackoverflow.com/ptomblin" target="_blank">http://careers.stackoverflow.com/ptomblin</a><br>
<br>
</div>
</blockquote></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><a href="http://www.linkedin.com/in/paultomblin">http://www.linkedin.com/in/paultomblin</a><br><a href="http://careers.stackoverflow.com/ptomblin">http://careers.stackoverflow.com/ptomblin</a><br>
<br>
</div>