Automating the creation of an Investigation from an Incident

Hello,

I’m able to create tickets since I’ve already automated the creation of an
Incident and linking multiple Incident Reports to it depending on some
specific criteria.

My question is duplicating the process of launching an Investigation from
an Incident as closely as possible to the web UI but on an automated basis.

I’m having trouble figuring out two points on this subject:

  1. How to get the Templates to be used during ticket creation, will this
    happen automatically or do I need to specify a template during creation?
  2. How to attach the Incident Reports that are linked to the Incident to
    the Investigation (similar to
    clicking the “Details” button and selecting all of the Incident Reports
    while launching an Investigation via the web UI.

Is this just a matter of building the MIMEObj with the contents of those
Incident Reports as attachments similar to the wikia.com entry at
http://requesttracker.wikia.com/wiki/ForkIntoNewTicket ?

Thank you for any advice or confirmations you can provide.

Landon Stewart :: lstewart@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932

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

You can link other tickets using Members, MembersOf, etc.On 9/10/13 7:34 PM, Landon Stewart wrote:

Hello,

I’m able to create tickets since I’ve already automated the creation of
an Incident and linking multiple Incident Reports to it depending on
some specific criteria.

My question is duplicating the process of launching an Investigation
from an Incident as closely as possible to the web UI but on an
automated basis.

I’m having trouble figuring out two points on this subject:

  1. How to get the Templates to be used during ticket creation, will this
    happen automatically or do I need to specify a template during creation?
  2. How to attach the Incident Reports that are linked to the Incident to
    the Investigation (similar to
    clicking the “Details” button and selecting all of the Incident Reports
    while launching an Investigation via the web UI.

Is this just a matter of building the MIMEObj with the contents of those
Incident Reports as attachments similar to the wikia.com
http://wikia.com entry at
http://requesttracker.wikia.com/wiki/ForkIntoNewTicket ?

Thank you for any advice or confirmations you can provide.


Landon Stewart :: lstewart@iweb.com mailto:lstewart@iweb.com
Lead Specialist, Abuse and Security Management
Sp�cialiste principal, gestion des abus et s�curit�
http://iweb.com :: +1 (888) 909-4932


Rtir mailing list
Rtir@lists.bestpractical.com
The rtir Archives

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.htmlhttp://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@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932