[Rtir] Automating the creation of an Investigation from an Incident

Landon Stewart lstewart at iweb.com
Thu Sep 12 03:29:32 EDT 2013


On 11 September 2013 05:10, Jim Brandt <jbrandt at bestpractical.com> wrote:

> The typical approach to automatically creating tickets is to create a
> scrip in the Incidents queue with an On Create condition and action of
> Create Tickets. Then create a template and include the values you want the
> new ticket to have. Note that new Investigations start with a status of
> open, so you need to include "Status: open" in your template. You can find
> the docs here:
>
> http://bestpractical.com/docs/**rt/latest/RT/Action/**CreateTickets.html<http://bestpractical.com/docs/rt/latest/RT/Action/CreateTickets.html>
>
> You can link other tickets using Members, MembersOf, etc.


Thanks for the reply Jim.

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 :: lstewart at iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rtir/attachments/20130912/fc52429a/attachment.html>


More information about the Rtir mailing list