diff options
Diffstat (limited to 'rt/docs/design_docs/approval_template')
-rw-r--r-- | rt/docs/design_docs/approval_template | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/rt/docs/design_docs/approval_template b/rt/docs/design_docs/approval_template new file mode 100644 index 000000000..16a988c5d --- /dev/null +++ b/rt/docs/design_docs/approval_template @@ -0,0 +1,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} |