Need help with multiple approval groups

Following the information found at
ApprovalCreation - Request Tracker Wiki, I have a created a
queue called “Password Resets” and allow users to place tickets in that
queue. An approval request is created in the ___Approvals queue when a new
ticket is created in the Password Resets queue. From the Wiki I’m using
this code in a template for Password Resets:
AdminCC: {
my $group_name = ‘Group Name’;
my $groups = RT::Groups->new( $RT::SystemUser );
$groups->LimitToUserDefinedGroups();
$groups->Limit(
‘FIELD’ => ‘Name’,
‘OPERATOR’ => ‘=’,
‘VALUE’ => $group_name );
$groups->First->Id;
}

Everything is working fine. If I change ‘Group Name’ in the above code to
the name of a group with approvers as members, then they get the email
notification and can approve or reject the request. My question is what
changes to the above code can I make so that the AdminCC group gets assigned
based on the requestor’s group membership. Let’s say I have Groups A, B,
and C and Approval Groups D, E, and F. If a user who is a member of Group A
places a ticket in the Password Resets queue, I’d like only Approval group D
to get copied as AdminCC and be able to approve the ticket. Does this make
sense? Is it even feasible? If not I could always create a different Reset
queue for each group and then just deal with that, but I’d like to avoid
that if possible.

Thanks for any insight you might be able to add.

View this message in context: http://old.nabble.com/Need-help-with-multiple-approval-groups-tp30012297p30012297.html