[Rt-devel] Associate and Attachment to a Transaction

Ruslan Zakirov ruz at bestpractical.com
Thu Nov 4 03:37:22 EDT 2010


Hi,

May be you just need $Ticket->Comment(...)?

On Wed, Nov 3, 2010 at 5:50 PM, Simone Sanna <simone.sanna at tinet.net> wrote:
> Hello,
>
> I am trying to generate a transaction of defined type,  and an attachment
> associated to that transaction with code like the one shown below, which
> calls directly _NewTransaction for transactions and _Attach for attachments.
> The attachment need to be a plain text comment, so will have a text Content
> and I should be able to define what the content is.
> Sorry the code is just an example, really I don't know how to manage this.
>
> Thanks in advance for any help.
>
> Kind regards,
> Simone
>
> ******* Code Begins*********
>
> my $Ticket = new RT::Ticket($RT::SystemUser);
> $Ticket->Load(168);
>
> my $Transaction = new RT::Transaction($RT::SystemUser);
> my ( $Trans, $TransMsg, $TransObj ) = $Ticket->_NewTransaction('Type' =>
> 'SMSOpenRecord', 'Data' => 'SMSOpenRecord', 'Content' => 'contenuto');
> my ($id, $msg) = $Transaction->_Attach('MIMEObject' => 'text/html',  ??);
>
> ********Code Ends***********
>
> --
> Simone Sanna
> Spectrum&  IT Policies System Administrator
> TINET SPA
> Località Sa Illetta S.S.195 Km.2,300
> 09122 Cagliari (ITALY)
> Ph. +39 0704600728
> E-mail: simone.sanna at tinet.net
>
> _______________________________________________
> List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel
>



-- 
Best regards, Ruslan.


More information about the rt-devel mailing list