1 package RT::Condition::StatusChangeQuietResolve;
2 use base 'RT::Condition';
8 This condition allows for muting of resolution notifications when
9 combined with the ticket status 'resolved_quiet'
11 If status has been updated as 'resolved_quiet', this condition
12 will block notification, and update ticket status to 'resolved'
14 If status has been updated as 'resolved', this condition
15 will block notification only if the previous ticket status
16 had been 'resolved_quiet'
22 my $txn = $self->TransactionObj;
23 my ($type, $field) = ($txn->Type, $txn->Field);
26 unless $type eq 'Status'
27 || ($type eq 'Set' && $field eq 'Status');
30 unless $txn->NewValue eq 'resolved'
31 || $txn->NewValue eq 'resolved_quiet';
33 my $ticket = $self->TicketObj;
35 if ($txn->NewValue eq 'resolved_quiet') {
36 $ticket->SetStatus('resolved');
39 elsif ($txn->NewValue eq 'resolved' && $txn->OldValue eq 'resolved_quiet') {
46 RT::Base->_ImportOverlays();