[rt-users] rt-crontool oddity
Gerald Vogt
vogt at spamcop.net
Fri May 23 03:21:41 EDT 2014
Hi!
I have set up a cron job to notify a group of users of unassigned
tickets like this:
/usr/local/rt4/bin/rt-crontool --search RT::Search::FromSQL --search-arg
'Queue = "Server" and Owner = "Nobody" and ( Status = "new" or Status =
"open" or Status = "stalled" )' --action RT::Action::NotifyGroup
--action-arg "Server Owners" --transaction first --template "Unassigned
Ticket Reminder"
The template is:
> Subject:Ticket "{$Ticket->Subject}" is still unassigned
>
> {$Transaction->CreatedAsString}: Request {$Ticket->id} is still unassigned.
> Transaction: {$Transaction->Description}
> Queue: {$Ticket->QueueObj->Name}
> Subject: {$Transaction->Subject || $Ticket->Subject || "(No subject given)"}
> Owner: {$Ticket->OwnerObj->Name}
> Requestors: {$Ticket->RequestorAddresses}
> Status: {$Ticket->Status}
> Ticket <URL: {RT->Config->Get('WebURL')}Ticket/Display.html?id={$Ticket->id} >
>
>
> {$Transaction->Content()}
This works fine as long as it is only a single ticket matching.
If multiple tickets are unassigned, e.g. 4 unassigned tickets, I get
four e-mails but it's always for the same ticket with variation of the
subject.
One Mail is correct:
> Subject: [RT #1234] Ticket "Test 1" is still unassigned
>
> Thu May 22 07:15:34 2014: Request 1234 is still unassigned.
> ...
The others look like this:
> Subject: [RT #1235][RT #1234] Ticket "Test 1" is still unassigned
>
> Thu May 22 07:15:34 2014: Request 1234 is still unassigned.
> ...
and this:
> Subject: [RT #1236][RT #1235][RT #1234] Ticket "Test 1" is still unassigned
>
> Thu May 22 07:15:34 2014: Request 1234 is still unassigned.
> ...
So it's always the same e-mail body for the first ticket and the subject
gets added RT tags.
How do I get this working properly?
Thanks,
Gerald
More information about the rt-users
mailing list