Eliminate "...Priority changed..." messages when running EscalatePriority

I’m running EscalatePriority 2 times a day to adjust ticket priorities. That is working fine.

What I need to figure out is how to eliminate the “Priority Changed” audit entries when this runs. Why?

  1. It’s annoying to see:

Thu Oct 28 12:10:19 2004 root - Priority changed from 21 to 30

Thu Oct 28 21:10:22 2004 root - Priority changed from 30 to 40

Fri Oct 29 12:10:20 2004 root - Priority changed from 40 to 48

Fri Oct 29 21:10:14 2004 root - Priority changed from 48 to 56

Sat Oct 30 12:10:17 2004 root - Priority changed from 56 to 62

Sat Oct 30 21:10:13 2004 root - Priority changed from 62 to 68

Sun Oct 31 12:10:14 2004 root - Priority changed from 68 to 72

Sun Oct 31 21:10:10 2004 root - Priority changed from 72 to 76

Mon Nov 01 12:10:15 2004 root - Priority changed from 76 to 78

Mon Nov 01 21:10:11 2004 root - Priority changed from 78 to 80

  1. More importantly, it changes who last updated the ticket. I’m planning on using the information on who last updated the tickets to highlight tickets that have been updated most recently by the requestor, and this kills the ability to do that.

Thanks,
Sam Eads
Atlanta

Mon Nov 01 21:10:11 2004 root - Priority changed from 78 to 80

It’s done right in the RT::Action::EscalatePriority perl module, down
where runs the $RT::Logger.

  1. More importantly, it changes who last updated the ticket. I’m planning on using the information on who last updated the tickets to highlight tickets that have been updated most recently by the requestor, and this kills the ability to do that.

Instead of doing it this way, take it from the last ticket update
transaction. Comments and Replys are always of the transaction types
’Comment’ or ‘Correspond’ though sometimes you’ll see ‘CustomField’ if
that’s the only thing the person updated.

Something along the lines of:

% my $TicketsObj = new RT::Tickets( $RT::SystemUser );
% # or $session{ ‘CurrentUser’ } instead of the system user.

% # provide some limits or however you prefer to do it…
%
% $TicketsObj->LimitQueue( VALUE => $Queue );
% # … other limits

% while ( my $CurrentTicketObj = $TicketsObj->Next ) {
% my $CurrentTransactionsObj = $CurrentTicketObj->Transactions;
% while ( my $CurrentTicketTransactionObj =
$CurrentTransactionsObj->Next ) {
% if (
% $CurrentTicketTransactionObj->Type eq ‘Comment’ ||
% $CurrentTicketTransactionObj->Type eq
’Correspond’ ||
% $CurrentTicketTransactionObj->Type eq ‘CustomField’
% ) {
% … your code …
% }

Andy Harrison