MuteResolve
Contributed by Cris
Overview
By default RT has a scrip to notify requestors when a ticket is resolved. This is generally a good idea; however, sometimes you may want to avoid notifying requestors. One example is when someone reopens a ticket just because he answered "Thanks" to your resolution notification.
How to set up MuteResolve in RT4:
1. Custom field creation
First create a new custom field: Configuration -> Custom Fields -> Create
Name: MuteResolve
Description: If Yes, don't send email notifications on resolve
Type: Select one value
(but I prefer Combobox because it looks better)
Applies to: Tickets
Validation: (?#YesNo)^(Yes|No|\z)$
(only necessary for Combobox)
When you click on "Save Changes" RT will let you enter Values.
Enter one value: "Yes". You need only fill the Name field, I have left Sort and Description empty. Then "Save Changes" again.
On the "Applies To" page select the queues where you want to enable the custom field, then on the "Group Rights" give the "ModifyCustomField" right to the "Privileged" system group.
2. Editing Scrip
Go to Configuration -> Global -> Scrips, then click on "On Resolve Notify Requestors"
Change "Condition" from "On Resolve" to "User Defined".
Change "Stage" from "TransactionCreate" to "TransactionBatch".
In the "Custom condition" box enter this code:
my $trans = $self->TransactionObj;
my $ticket = $self->TicketObj;
# is this a resolve?
return 0 unless ($trans->Type eq "Status" && $trans->NewValue eq "resolved");
my $val = $ticket->FirstCustomFieldValue('MuteResolve');
if ($val eq 'Yes') {
$RT::Logger->debug("MuteResolve (Requestor): Yes.");
return 0;
}
return 1;