[rt-users] Add comment to ticket from Scrip?

Jean-Sebastien Morisset jsmoriss at mvlan.net
Mon Jul 28 15:19:13 EDT 2008


Hi everyone,

I have the following script:

Custom condition
----------------
return 0 unless ($self->TransactionObj->Type eq "Correspond");
return 0 unless ($self->TicketObj->FirstCustomFieldValue('49'));
return 1;

Custom action preparation code
------------------------------
my $event_no = $self->TicketObj->FirstCustomFieldValue('49');
my $exec_res;
system("/opt/rt3/bin/tivoli-event.sh ACK $event_no");
return 1;

I'd like to read the output of that system call and add it as a comment
to the ticket. Reading the output is no problem, but how to I add a
comment to the current ticket?

Thanks,
js.
-- 
Jean-Sebastien Morisset, Sr. UNIX Administrator <jsmoriss at mvlan.net>



More information about the rt-users mailing list