[rt-users] What's wrong with this Create-Ticket template?
Todd Chapman
todd at chaka.net
Sat Apr 28 23:31:27 EDT 2007
I have a scrip that creates an approval ticket with the
regular ticket is resolved. The trick is that the AdminCcs
for the approval need to be the groups in the AdminCc for
the ticket's queue.
Here is the method I created in Queue_Local to generate
that part of the template:
sub AdminCcForApprovalTemplate {
my $self = shift;
my @members = ();
my $admin_group = $self->AdminCc;
my $group_members = $admin_group->MembersObj;
$group_members->LimitToGroups;
while ( my $member = $group_members->Next ) {
push @members, "AdminCc: " . $member->MemberObj->id . "\n";
}
return join("", @members);
}
And here is the template:
===Create-Ticket: approval
Subject: Approval for work order
#{$Tickets{'TOP'}->id}:{$Tickets{'TOP'}->Subject}
Depended-On-By: TOP
Queue: Approvals
Type: approval
{ $Tickets{'TOP'}->QueueObj->AdminCcForApprovalTemplate() }
Content: Please review and approve or deny work order
#{$Tickets{'TOP'}->id}
ENDOFCONTENT
I think the ticket isn't processing or something else isn't
working because there are not logs should the scrip running.
If I remove the line with AdminCcForApprovalTemplate in it
then the scrip runs fine, though with no AdminCcs added.
Any ideas?
Thanks!
More information about the rt-users
mailing list