[Rt-devel] calling another perl script once ticket is
saved/updated
Joby Walker
joby at u.washington.edu
Fri Oct 7 14:18:09 EDT 2005
This should be pretty easy. Just create a new Scrip:
Description: whatever
Condition: On Create
Action: UserDefined
Template: Global template: None
Stage: TransactionCreate (or Batch)
Then in the Custom Action Prep just:
`Path/to/script.pl $self->TicketObj->Id`;
As a part of our eval I set up a separate script to determine a contact
if the CustomField "Hostname" was set:
Action Prep Code:
my $ticket = $self->TicketObj;
if ($ticket->CustomFieldValues("Hostname")->Next == undef){
return(undef);
}
if ($ticket->CustomFieldValues("Contact")->Next != undef){
return(undef);
}
my $hostname = $ticket->CustomFieldValues("Hostname")->Next->Content;
$self->{'custvalue'} = `/data/rt34/bin/oncall $hostname`;
$self->{'custfield'} = $ticket->QueueObj->CustomField("Contact");
return (1);
Joby Walker
ITI SSG, University of Washington
Vipin Hegde wrote:
> Hi,
>
> I’m new to RT, so please don’t flame me for asking a newbie question : )
>
>
>
> Here’s the problem:
>
> I’ve been asked to modify RT so that every time a ticket is created /
> modified, I need to take that ticket content and save it in another CRM
> system that my company uses as well; I’ve already finished writing a
> separate script which expects a ticket_id to be passed to it and this
> script does the rest of the work; all that’s left for me to do is to
> insert a call to that script into the RT’s source code wherever tickets
> are saved into the mysql database. I've been trying to find out which
> source code file is responsible for inserting the data into the
> associated mysql database, but, for the life of me, i cant seem to
> figure this out.... help ! : )
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Rt-devel mailing list
> Rt-devel at lists.bestpractical.com
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel
More information about the Rt-devel
mailing list