Script based on CustomField

Hello,

I have been trying to make a script that adds whole user groups as Watchers in a ticket. It should be triggered by ticket creation event which is no problem to set up. I created a customfield where I can choose multiple user groups and added that field to a ticket creation page. I was trying to modify AddSquelchedCc script but with no luck. I suck @ Perl.

The script should take RT user group names from the customfield and add all the members of those groups as Watchers when a ticket is created.

I would be thrilled if someone could help with that.

Thanks in advance,
Karol

Hi Karol,
I managed to add specific people as AdminCc, but I’m not shure how to do this with groups.
Here is the code anyway:

my $admincclist = $self->TicketObj->AdminCc;
my $user = RT::User->new($RT::SystemUser);
$user->LoadByEmail('example.member@example.com');
$admincclist->AddMember($user->Id);

Maybe you can adapt it to your needs.
Best regards,
Tobi

Hi Tobias,
thank you for your reply. To be honest I gave up on this, as it turns out, one of my departments colleagues knows a bit of Perl and will look at the problem when he has time. If we manage to get a satisfying result I will post it here.

Regards,
Karol