Hi,
I’m trying to send an email from template, initiated by rt-crontool as
described in wiki, the only trick is that dependent on custom field it
should be sent to other persons group. Here my template, somehow it always
send to user1 and user 2.
RT-Send-Cc: { my $values = $Ticket->CustomFieldValues(‘CIT_Category’);
my $OUTPUT;
my $CFValue;
while ( my $value = $values->Next ) {
$CFValue = $value->Content;
if ($CFValue == ‘IT Facilites’) { $OUTPUT = ‘user1@dom.com,
user2@dom.com’ }
elsif ($CFValue == ‘Linux/Network’) { $OUTPUT = ‘user3@dom.com,
user4@dom.com’ }
elsif ($CFValue == ‘Phone’) { $OUTPUT = ‘user5@dom.com, user6@dom.com’
}
elsif ($CFValue == ‘Windows’) { $OUTPUT = ‘user7@dom.com, user8@dom.com’
}
}
$OUTPUT;
}
The ticket {$Ticket->id} stayed unowned for 30 minutes.
Please do a categorisation, assign optionally an owner!
Any idea what I’m doing wrong, maybe there is some, more elegant method to
do a custom field based escalation, here is how I’am starting the
rt-crontool:
rt-crontool --search RT::Search::FromSQL --search-arg “id = 23331” --action
RT::Action::RecordComment --template ‘UnownedNotifyWatcherLevel1’
Thanks in advance,
Ivan Samarin