Hi,<br><br>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.<br>
<br>########################<br>Subject: new ticket, 30 minutes unowned!<br>RT-Send-Cc: { my $values = $Ticket->CustomFieldValues('CIT_Category');<br> my $OUTPUT;<br> my $CFValue;<br> while ( my $value = $values->Next ) {<br>
$CFValue = $value->Content;<br> if ($CFValue == 'IT Facilites') { $OUTPUT = '<a href="mailto:user1@dom.com">user1@dom.com</a>, <a href="mailto:user2@dom.com">user2@dom.com</a>' }<br> elsif ($CFValue == 'Linux/Network') { $OUTPUT = '<a href="mailto:user3@dom.com">user3@dom.com</a>, <a href="mailto:user4@dom.com">user4@dom.com</a>' }<br>
elsif ($CFValue == 'Phone') { $OUTPUT = '<a href="mailto:user5@dom.com">user5@dom.com</a>, <a href="mailto:user6@dom.com">user6@dom.com</a>' }<br> elsif ($CFValue == 'Windows') { $OUTPUT = '<a href="mailto:user7@dom.com">user7@dom.com</a>, <a href="mailto:user8@dom.com">user8@dom.com</a>' }<br>
}<br> $OUTPUT;<br>}<br><br>The ticket {$Ticket->id} stayed unowned for 30 minutes. <br><br>Please do a categorisation, assign optionally an owner!<br>######################################<br><br>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:<br>
<br>rt-crontool --search RT::Search::FromSQL --search-arg "id = 23331" --action RT::Action::RecordComment --template 'UnownedNotifyWatcherLevel1'<br><br>Thanks in advance,<br><br>Ivan Samarin<br><br>