[rt-users] Sending notification / alert mails without creating comments
Jim Berry
jim.h.berry at frb.gov
Mon Jul 29 08:51:10 EDT 2013
Craig,
On the wiki there was a reference to an rt-remind script at http://www.cs.kent.ac.uk/people/staff/tdb/rt3/rt-remind, which we downloaded and modified for our purposes. We have several cron jobs which use it to nag/notify owners, requestors, and managers (hourly, daily, or weekly, depending on the situation). Not optimal, but it has worked for us.
Jim
-----Original Message-----
From: rt-users-bounces at lists.bestpractical.com [mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Craig Ringer
Sent: Sunday, July 28, 2013 11:04 PM
To: RT users
Subject: [rt-users] Sending notification / alert mails without creating comments
Hi all
I've been trying to do something that I expected to be simple with RT:
Send reminders to subscribers on a ticket *without* creating any comment or correspondence on the ticket. Send an email silently, in other words.
It turns out that much of RT::Action::SendEmail expects to have a current transaction and crashes ungracefully if there isn't one - it doesn't test to see if it gets a value for TransactionObj, but it fails at several points if the transaction is undef. It doesn't really seem to provide a way to tell it what group(s) you want notified except by examining the transaction either.
I can write a completely separate action to do the job but I'll have to duplicate much of the code in RT::Action::SendEmail to do so, and that seems like a maintenance nightmare. The module isn't easily extended by a subclass in this way because many of the interesting bits are in the Prepare method anyway.
How do others handle sending reminders and alerts, like SLA reminders?
Do you just live with the annoying comment spam in tickets? Send mail directly, bypassing most of RT's mail handling code?
I'm trying to find a way to reduce the amount of code duplication I need to do to send mail that's consistent with how RT expects other outbound mail to look - appropriate headers, etc.
RT::Action::SendEmail::SendMessage(...) has the comment "TODO: Break this out to a separate module" in master and has had for a very long time. Willing to consider a patch that does so and tries to split RT::Action::SendEmail up into smaller, more easily wrapped/overridden methods too?
--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20130729/378ac843/attachment.htm>
More information about the rt-users
mailing list