Delayed action scrips and combining scrip email output

Hello all,

Our department is hoping for a couple features in RT that I haven’t been
able to implement yet. If someone could provide feedback on whether
these features are even feasible to implement in RT 3.4.6 – or whether
I should be asking this as a feature request on the rt-devel list – it
would be appreciated.

  1. A scrip is needed that will take conditional action at a point in
    time after a transaction occurs. For example, we would like the
    autoresponse scrip to send an autoresponse 30 minutes after a ticket is
    received, but only if the ticket was not responded to in that time. It
    seems to me that putting a 30 minute sleep() in the autoresponse scrip
    is not the correct way to do this since scrips are intended to be
    transactional. Does anyone have any alternate suggestions for this?

  2. We would like to be able to combine outgoing emails generated by
    scrips on a transaction, so that the To: and Cc: headers list all
    visible recipients of the email. For example, we have a scrip “On
    Correspond Notify Requestors and Ccs with template Correspondence” which
    sends a message to the Requestor and Ccs, and a scrip “On Correspond
    Notify Other Recipients with template Correspondence” which sends a
    message to the RT-Send-Ccs in a separate email. Again, since scrips are
    transactional, I can’t see any way to do this without rewriting each
    potential combination of recipients as its own scripaction, but this
    approach seems rather cumbersome and inflexible. Is there a better way
    to do this?

Thanks in advance,
-Bill

William Horka
UNIX Systems Administrator
Harvard-MIT Data Center

  1. A scrip is needed that will take conditional action at a point in
    time after a transaction occurs. For example, we would like the
    autoresponse scrip to send an autoresponse 30 minutes after a ticket
    is
    received, but only if the ticket was not responded to in that time. It
    seems to me that putting a 30 minute sleep() in the autoresponse scrip
    is not the correct way to do this since scrips are intended to be
    transactional. Does anyone have any alternate suggestions for this?

What about using rt-crontool run every n minutes to look for new tickets
created within a specified time range?

rt-users-request@lists.bestpractical.com wrote:

Date: Mon, 12 Feb 2007 13:33:36 -0500
From: “Jacob Helwig” Jacob@buschs.com
Subject: RE: [rt-users] Delayed action scrips and combining scrip
email output

  1. A scrip is needed that will take conditional action at a point in
    time after a transaction occurs. For example, we would like the
    autoresponse scrip to send an autoresponse 30 minutes after a ticket
    is
    received, but only if the ticket was not responded to in that time. It
    seems to me that putting a 30 minute sleep() in the autoresponse scrip
    is not the correct way to do this since scrips are intended to be
    transactional. Does anyone have any alternate suggestions for this?

What about using rt-crontool run every n minutes to look for new tickets
created within a specified time range?

Thanks for the suggestion. That could work, although I suppose I would
need to write custom RT::Conditions for each condition we wanted to test
– the above was a simplified example, which could use
RT::Condition::UntouchedInHours. We also have a need to identify if a
ticket changed queues within a period of time, which I was hoping to do
using an event-driven scrip and RT::Condition::QueueChange. Using
rt-crontool I suppose it would be necessary to write a
RT::Condition::QueueChangeInHours that iterates over the last n ticket
transactions.

  -Bill

William Horka
UNIX Systems Administrator
Harvard-MIT Data Center