This was originally posted to the RTIR list but I'm x-posting it here because it's not specific to RTIR and I'm still having difficulties.
I've been unable to figure out how to call an action module from another action module but instead I've been working on an action module that basically: - gets called on an Incident (and uses the create and correspond transactions to open a new Investigations ticket) - attaches the Incident Reports linked to that Incident to the Investigation… I have it creating a ticket although I haven't filled in much of the CustomFields I'll need to I cannot get it to use a template for some reason. Specifically the LoadQueueTemplate() and Parse() a bit of a mystery to me. Example: $templateObj->LoadQueueTemplate( Queue => "Investigations", Name => $classification." (en)" ); my($ret, $msg) = $templateObj->Parse( TicketObj => $new_ticket, TransactionObj => $self->TransactionObj ); I am building a MIME::Entity above this called $MIMEObj including all the attachments etc but I don't understand how to get Parse() to to "do something" to the MIMEObj to get the MIME::Entity->build( Data => … ) to use the template. Also the attachments are coming out in-line in the message instead of attachments but that's probably because the "RT-Attach-Message: yes" header is in the template that's not being used if I'm understanding the use of that header correctly. A more full representation of the code is here: http://pastebin.com/QF2tbZqH Thanks to anyone who has an idea of what I'm missing or doing wrong here and might have some ideas for me. -- Landon Stewart :: lstew...@iweb.com Lead Specialist, Abuse and Security Management Spécialiste principal, gestion des abus et sécurité http://iweb.com :: +1 (888) 909-4932
-- RT Training in New York, October 8th and 9th: http://bestpractical.com/training