Time-based Admincc: changes per queue?

Hi

Does anyone have a neat way of changing the AdminCC:'s
on a queue dynamically, based on the day and time of
day?

Because we operate 24/7 there are certain queues which
are managed by different teams outside of normal
working hours. During those times the call volume is
also significantly less. Hence, outside normal hours I
am interested in a way to generate emails to an RT
group whenever something changes in that queue.

This is equivalent to the AdminCC: behaviour but I
want to dynamically switch the setting on and off. I
guess I could run a cron job that went straight at the
underlying data but wondered if anyone had come up
with a neater way of doing this perhaps?

Thanks in advance

Regards

Brian

Introducing the new Yahoo! Answers Beta – A new place to get answers to your questions – Try it http://uk.answers.yahoo.com

brian mccabe wrote:

Does anyone have a neat way of changing the AdminCC:'s
on a queue dynamically, based on the day and time of
day?

I can think of a few ways to do it. The AdminCC watcher list for a Queue
can be modified by scrips. So you could have a script that does the
following.

– Fires on an appropriate transaction (“correspond” and “comment” are
obvious choices)

– Checks the current time and Queue watcher list.

– Based on the time, changes the Queue watcher list.

Jesse Vincent’s Business::Hours module would be most useful for this
purpose.

Example:

Custom condition:

if ( ($self->TransactionObj->Type eq ‘Create’)
|| ($self->TransactionObj->Type eq ‘Correspond’)
|| ($self->TransactionObj->Type eq ‘Comment’)
## Add other transaction types as appropriate, depending on
## when & why you want to send notifications.
)
{ return (1); }
else
{ return (undef); }

Custom action prep:

Check to see if day group is currently on the Watcher list

but it’s night so now we need to switch

my $Queue = $self->$TicketObj->QueueObj;

if ( ( # your custom time condition here
# to determine that it’s now night/off-hours
# may be really complicated
)
&&
( $Queue->IsWatcher(Type => ‘AdminCc’,
Email => ‘daygroup@blah.co.uk’)
)
)
{ return (1); }
else
{ return (undef); }

Custom action cleanup:

my $Queue = $self->$TicketObj->QueueObj;

$Queue->DeleteWatcher(Type => ‘AdminCc’,
Email => ‘daygroup@blah.co.uk’);

$Queue->AddWatcher(Type => ‘AdminCc’,
Email => ‘nightgroup@blah.co.uk’);

return(1);

end code!

Another way to do it would be to write a custom template that pumps in a
predefined “To” list based on the time of day, then use your custom
condition with the Notify Other Recipients action to send the
notifications. Forget about the whole AdminCc thing at all. In fact, now
that I think about it, that would probably be a whole lot easier than
dorking around with the Watcher lists for the Queue.

Yet a Third Way to do it: set up a custom notification e-mail list that
has its own timer that switches between the on-call service groups, and
abstract the whole thing out of RT. This would have the secondary
advantage that you could use the notification e-mail list for other
things, like sending non-RT-related notes to the current on-call service
group.

OK, I can only think of 3 ways to do it.

Rick R.

rickr.vcf (182 Bytes)