RT-Extension-Conservancy/lib/RT/Action/NotifyOwnerOrQueueAdminCcs.pm

23 lines
636 B
Perl

package RT::Action::NotifyOwnerOrQueueAdminCcs;
use strict;
use warnings;
use base qw(RT::Action::NotifyOwnerOrAdminCc);
sub SetRecipients {
my $self = shift;
$self->SUPER::SetRecipients();
my $ticket = $self->TicketObj;
# If the ticket has an owner, that person was set as the recipient.
# Now add ticket AdminCcs to the Bcc list.
if ($ticket->Owner != RT->Nobody->id) {
push(@{$self->{Bcc}}, $ticket->AdminCc->MemberEmailAddresses);
}
# If the ticket has no owner, both queue and ticket AdminCCs were set as
# recipients. There's nothing else to do.
}
RT::Base->_ImportOverlays();
1;