blob: 16a988c5d7e0b31d412b426a1c5bfb39ac0b0d7d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
===Create-Ticket: approval
{ my $name = "HR";
my $groups = RT::Groups->new($RT::SystemUser);
$groups->LimitToUserDefinedGroups();
$groups->Limit(FIELD => 'Name', OPERATOR => '=', VALUE => "$name");
$groups->WithMember($TransactionObj->CreatorObj->Id);
my $groupid = $groups->First->Id;
my $adminccs = RT::Users->new($RT::SystemUser);
$adminccs->WhoHaveRight(Right => 'AdminGroup', IncludeSystemRights => undef, IncludeSuperusers => 0, IncludeSubgroupMembers => 0, Object => $groups->First);
my @admins;
while (my $admin = $adminccs->Next) {
push (@admins, $admin->Name);
}
}
Queue: Approvals
Type: Approval
AdminCcs: {join (", ",@admins) }
Depended-On-By: {$tickets{'TOP'}->Id}
Refers-To: {$tickets{'TOP'}->Id}
Due: {time + 86400}
Content-Type: text/plain
Content: Your approval is requested for the ticket {%$tickets{'TOP'}->Id}: {$tickets{'TOP'}->Subject}
|