[Rt-commit] rt branch, 4.4-trunk, updated. rt-4.4.2-104-gf02095dd6
? sunnavy
sunnavy at bestpractical.com
Thu Mar 29 14:01:08 EDT 2018
The branch, 4.4-trunk has been updated
via f02095dd6e76997b797226ce3f5addf231ba8b14 (commit)
via 5aeebb48a71af417c5ff55912a7dd665d5e81217 (commit)
from 33e1d85f7c2f29be24eccbb63f8788f5e6408ffc (commit)
Summary of changes:
lib/RT/Action/Notify.pm | 14 +++++++++-----
lib/RT/Action/NotifyGroup.pm | 9 ++++++---
2 files changed, 15 insertions(+), 8 deletions(-)
- Log -----------------------------------------------------------------
commit 5aeebb48a71af417c5ff55912a7dd665d5e81217
Author: Shawn M Moore <shawn at bestpractical.com>
Date: Fri Apr 14 17:26:25 2017 -0400
Add support for a NeverNotifyActor argument to Notify actions
Fixes: T#184265
diff --git a/lib/RT/Action/Notify.pm b/lib/RT/Action/Notify.pm
index 5ce594cda..a74d61ed2 100644
--- a/lib/RT/Action/Notify.pm
+++ b/lib/RT/Action/Notify.pm
@@ -139,7 +139,8 @@ sub SetRecipients {
|| $name eq 'AdminCc'
|| $name eq 'Cc'
|| $name eq 'OtherRecipients'
- || $name eq 'AlwaysNotifyActor';
+ || $name eq 'AlwaysNotifyActor'
+ || $name eq 'NeverNotifyActor';
my $roles = RT::CustomRoles->new( $self->CurrentUser );
$roles->Limit( FIELD => 'Name', VALUE => $name, CASESENSITIVE => 0 );
@@ -237,8 +238,10 @@ sub SetRecipients {
Remove transaction creator as appropriate for the NotifyActor setting.
-To send email to the selected receipients regardless of RT's NotifyActor
-configuration, include AlwaysNotifyActor in the list of arguments.
+To send email to the selected recipients regardless of RT's NotifyActor
+configuration, include AlwaysNotifyActor in the list of arguments. Or to
+always suppress email to the selected recipients regardless of RT's
+NotifyActor configuration, include NeverNotifyActor in the list of arguments.
=cut
@@ -255,8 +258,9 @@ sub RemoveInappropriateRecipients {
return unless lc $_[0] eq lc $creator;
return "not sending to $creator, creator of the transaction, due to NotifyActor setting";
},
- ) unless RT->Config->Get('NotifyActor',$TransactionCurrentUser)
- || $self->Argument =~ /\bAlwaysNotifyActor\b/;
+ ) if $self->Argument =~ /\bNeverNotifyActor\b/ ||
+ (!RT->Config->Get('NotifyActor',$TransactionCurrentUser)
+ && $self->Argument !~ /\bAlwaysNotifyActor\b/);
$self->SUPER::RemoveInappropriateRecipients();
}
diff --git a/lib/RT/Action/NotifyGroup.pm b/lib/RT/Action/NotifyGroup.pm
index 41f2b7880..bc5ca5651 100644
--- a/lib/RT/Action/NotifyGroup.pm
+++ b/lib/RT/Action/NotifyGroup.pm
@@ -75,8 +75,10 @@ require RT::Group;
Sets the recipients of this message to Groups and/or Users.
Respects RT's NotifyActor configuration.
-To send email to the selected receipients regardless of RT's NotifyActor
-configuration, include AlwaysNotifyActor in the list of arguments.
+To send email to the selected recipients regardless of RT's NotifyActor
+configuration, include AlwaysNotifyActor in the list of arguments. Or to
+always suppress email to the selected recipients regardless of RT's
+NotifyActor configuration, include NeverNotifyActor in the list of arguments.
=cut
@@ -97,7 +99,8 @@ sub _HandleArgument {
my $self = shift;
my $instance = shift;
- return if ( $instance eq 'AlwaysNotifyActor' );
+ return if $instance eq 'AlwaysNotifyActor'
+ || $instance eq 'NeverNotifyActor';
if ( $instance !~ /\D/ ) {
my $obj = RT::Principal->new( $self->CurrentUser );
commit f02095dd6e76997b797226ce3f5addf231ba8b14
Merge: 33e1d85f7 5aeebb48a
Author: sunnavy <sunnavy at bestpractical.com>
Date: Fri Mar 30 01:57:21 2018 +0800
Merge branch '4.4/never-notify-actor' into 4.4-trunk
-----------------------------------------------------------------------
More information about the rt-commit
mailing list