[rt-users] Adding comments to a ticket via the API, scrips don't activate?
Stewart Tranter
S.G.Tranter at lboro.ac.uk
Wed May 24 10:35:09 EDT 2006
Hi,
As part of an escalation script, I need to add a comment to the
escalated ticket and then CC this comment to another user. I have
created the following code:
my $commentmail = "ESCALATION TEXT";
my $emailcontent = MIME::Entity->build(
From => 'RT Final Escalation <root at hostname.com>',
Subject => "Case $tid has escalated.",
Data => \$commentmail);
my %comment_data = (
TimeTaken => "0",
CCMessageTo => $queueadmin,
MIMEObj => $emailcontent);
$ticket->Comment(%comment_data);
This successfully adds a comment, but does not send any e-mails out.
There are OnComment scrips to send out a notification e-mail with the
standard comment template to the owner and to "Other Recipients". Do I
need code to trigger the scrips? Or have I made a mistake with the
above code?
Stewart
------------------------------------------------
Stewart Tranter
Computing Services
Loughborough University
E: s.g.tranter at lboro.ac.uk
W: http://www.lboro.ac.uk/computing/
T: +44 (0) 1509 223719
F: +44 (0) 1509 223989
------------------------------------------------
More information about the rt-users
mailing list