Rt-crontool oddity

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

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.

This is bug #29454 on issues.bestpractical.com, and is fixed in the
4.2/cron-template-caching branch.

  • Alex

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.

This is bug #29454 on issues.bestpractical.com, and is fixed in the
4.2/cron-template-caching branch.

  • Alex

I have applied the changes of 4.2/cron-template-caching to my 4.2.3
installation and all e-mails sent are looking good. Thanks. -Gerald

[snip]

Please keep replies on-list.

Is this planned to be merged into the core branch soon?

I expect so. Due to the ckeditor-paste bug, I expect to ship a 4.2.5
relatively quickly; it is my hope that 4.2/cron-template-caching will be
merged prior to that, but for now it is still in branch review.

  • Alex

Apologies; just hit “reply” instead of “reply to all”.

I will keep an eye open for the 4.2.5 release.

Thanks,
JonFrom: Alex Vandiver [alexmv@bestpractical.com]
Received: Friday, 23 May 2014, 16:58
To: Jon Witts [jwitts@queenmargarets.com]; rt-users@lists.bestpractical.com [rt-users@lists.bestpractical.com]
Subject: Re: [rt-users] rt-crontool oddity

[snip]

Please keep replies on-list.

Is this planned to be merged into the core branch soon?

I expect so. Due to the ckeditor-paste bug, I expect to ship a 4.2.5
relatively quickly; it is my hope that 4.2/cron-template-caching will be
merged prior to that, but for now it is still in branch review.

  • Alex

This email has been processed by Smoothwall Anti-Spam - www.smoothwall.net