Automatically adding watchers to a new ticket - RT 3.0.1

Hello folks!

RT 3.0.1 on Redhat 7.3, an oldie but a goodie to be sure :slight_smile:

Wondering if I am doing something wrong or if this feature is just
broken in this version. Things are working mostly really well at the
present time which makes upgrading anything an unattractive option.

I’ve set a particular queue to add several e-mail addresses as
watchers and that seems to have taken
OK. Configuration->Queues->Queue->Watchers does list the newly added
e-mail addresses correctly.

However, when a new ticket is created in the queue, the watchers are
not added to the cc list.

I gave “everyone” watch rights and that didn’t seem to help either.

What am I doing wrong please?

Frank;
When you say added to the CC list , you mean the ticket CC watchers or
the emails sent out ??
If ticket CC: then it does not quite work like that, what you
created/done is queue watchers (these email addresses will get an email
for tickets updated in the queue) , as soon as you move the ticket to
another queue these email addresses will no longer get updates.What you
need is to create a scrip that add watchers when a ticket is created ,
you can have that scrip as global or per queue
If you just wish them to get updates from that one particular queue then
make sure you have a scrip enabled on that queue On corresspond Notify CC …
Regards;
Roy

Frank Saxton wrote:

Hello Roy

Thanks very much for the quick response!

Yes, I would like to add several e-mail addresses to the ticket cc
list upon creation. I often have to access RT via my Blackberry and
having everyone automatically added to the ticket makes it much
easier for me to trim people off rather than adding them on.

I’ve never worked with scripts but it doesn’t look too difficult
although I’m guessing for this particular action a bit of custom code
will be required. I’m wondering if someone already has something
like this on their RT and can jump start me a little.

Thanks again!

At 04:09 AM 3/21/2007, Roy El-Hames wrote:

For fun, I tried to create a script in one of the queues to
automatically add an e-mail address to the ticket cc list. Not
surprisingly, it failed. I’m sure it’s a syntax issue but after
looking all over Wiki there really aren’t any examples that are on
point. It probably wouldn’t take much of a nudge to get me pointed
in the right direction.

Description: Add Watchers
Condition: On create
Action: User defined
Custom action preparation code:
$Ticket->AddWatcher (Email => ‘foo@bar.com’ );

Template: Global template blank

Here’s the error I got:

Mar 21 08:03:31 rt RT: Scrip 15 Prepare failed: Global symbol
"$Ticket" requires
explicit package name at (eval 1622) line

  1. (/opt/rt3/lib/RT/Action/UserDefin
    ed.pm:43)

This works… thanks Roy!

Description: Add Watchers
Condition: On create
Action: User defined
Custom action preparation code:
$self->TicketObj->AddWatcher( Type => “Cc”,
Email =>"address@email.com");
return 1;

Template: Global template blank