Script based on CustomField


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,

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);

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

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.