[rt-users] Add requestor group as cc
Michael Polenske
Michael.Polenske at skm-skyline.de
Wed Sep 21 04:46:33 EDT 2011
Dear all,
we use the scrip "AddSquelchedCC" to add groups members of the creating
user as cc. Works like harm, except for the fact, that if admin of the
system creates a ticket for the user (if user in on the phone and has no
internet access) - in that case the groups of the admin will be added to
cc. I guess the problem is that in the scrip "creator" is used to find
out the membership of the groups and not "requestor":
my $groups = RT::Groups->new($RT::SystemUser);
$groups->LimitToUserDefinedGroups();
while (my $group = $groups->Next()) {
next unless $group->Name =~ /^TEAM_/;
if($group->HasMemberRecursively($ticket->Creator)){
$ticket->AddWatcher(Type=>"Cc",PrincipalId=>$group->Id);
So best solution for me would be to exchange
"HasMemberRecursively($ticket->Creator"
With
"HasMemberRecursively($ticket->Requestor"
But this does not work. Any hint ?
Best regards,
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20110921/86088706/attachment.htm>
More information about the rt-users
mailing list