NotifyOwnerOrQueueAdminCcs: Initial Scrip action.
This commit is contained in:
parent
50e684e755
commit
50db9059bd
3 changed files with 32 additions and 1 deletions
8
etc/upgrade/0.2/content
Normal file
8
etc/upgrade/0.2/content
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/usr/bin/env perl
|
||||||
|
|
||||||
|
@ScripActions = (
|
||||||
|
{ Name => 'Notify Owner or Queue AdminCcs',
|
||||||
|
Description => 'Sends mail to ticket AdminCCs, plus the Owner if set, otherwise queue AdminCCs',
|
||||||
|
ExecModule => 'NotifyOwnerOrQueueAdminCcs',
|
||||||
|
},
|
||||||
|
);
|
23
lib/RT/Action/NotifyOwnerOrQueueAdminCcs.pm
Normal file
23
lib/RT/Action/NotifyOwnerOrQueueAdminCcs.pm
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
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;
|
|
@ -7,6 +7,6 @@ use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
package RT::Extension::Conservancy;
|
package RT::Extension::Conservancy;
|
||||||
|
|
||||||
our $VERSION = '0.1';
|
our $VERSION = '0.2';
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
Loading…
Reference in a new issue