/usr/local/bin/rt-crontool --verbose --search RT::Search::FromSQL --search-arg "Queue = 'Antivirus L1' AND (Status = 'new')" --action RT::Action::EscalatePriority --transaction lastSo for each L1 and L2 Queue I have I made a scrip with the following conditions:
Description: | |
Condition: | |
Action: | |
Template: | |
Stage: |
You will want to change the name-of-queue to whatever your queue is called.
Custom Action Preparation Code:
Custom Action Cleanup code:
You will of course want to replace the Queue # and Priority # with the actual number of the new queue and new base and final priority settings.
This can be very tedious to setup for each and every queue, but it seems to work for me and I am sure it can work for you too!
Custom Action Preparation Code:
my $status = $self->;TicketObj->;Status;
my $final = $self->;TicketObj->;FinalPriority;
my $priority = $self->;TicketObj->;Priority;
return 0 unless $self->;TransactionObj->;Field eq 'Priority';
return 0 unless $status eq 'open' || $status eq 'new' || $status eq 'stalled';
return 0 unless $final >; 0;
return 0 unless $final == $priority;
return 1;
Custom Action Cleanup code:
my $newqueue = "#";
my $final = $self->;TicketObj->;FinalPriority;
my $priority = $self->;TicketObj->;Priority;
my $T_Obj = $self->;TicketObj;
$RT::Logger->;info("Auto assign ticket #". $T_Obj->;id ." to queue #". $newqueue );
my ($status, $msg) = $T_Obj->;SetQueue($newqueue);
unless ($status) {
$RT::Logger->;warning("unable to set new queue: $msg");
return undef;
}
$RT::Logger->;info("Change Ticket Priority ". $T_Obj->;id ." to ". "#" );
my ($status, $msg) = $T_Obj->;SetPriority("#");
unless ($status) {
$RT::Logger->;warning("unable to set new priority: $msg");
return undef;
}
$RT::Logger->;info("Change Final Priority ". $T_Obj->;id ." to ". "#" );
my ($status, $msg) = $T_Obj->;SetFinalPriority("#");
unless ($status) {
$RT::Logger->;warning("unable to set new final priority: $msg");
return undef;
}
return 1;
You will of course want to replace the Queue # and Priority # with the actual number of the new queue and new base and final priority settings.
This can be very tedious to setup for each and every queue, but it seems to work for me and I am sure it can work for you too!
No comments:
Post a Comment