[Rt-commit] rt branch, 3.8-trunk, updated. rt-3.8.6-116-g59b5f56
Kevin Falcone
falcone at bestpractical.com
Thu Dec 3 09:59:39 EST 2009
The branch, 3.8-trunk has been updated
via 59b5f56d348983efb5c6ec40fc1e2148d7fd004d (commit)
from 028d05d761ec6407e56b315a379b156bf611d891 (commit)
Summary of changes:
lib/RT/Action/Notify.pm | 7 +++++--
lib/RT/Action/NotifyGroup.pm | 9 +++++++--
lib/RT/Config.pm | 10 ++++++++++
3 files changed, 22 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit 59b5f56d348983efb5c6ec40fc1e2148d7fd004d
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Thu Dec 3 08:47:03 2009 -0500
Make NotifyActor into a User Preference
diff --git a/lib/RT/Action/Notify.pm b/lib/RT/Action/Notify.pm
index 30238fd..3b782f3 100755
--- a/lib/RT/Action/Notify.pm
+++ b/lib/RT/Action/Notify.pm
@@ -139,12 +139,15 @@ sub SetRecipients {
}
}
- my $creator = $self->TransactionObj->CreatorObj->EmailAddress();
+ my $creatorObj = $self->TransactionObj->CreatorObj;
+ my $creator = $creatorObj->EmailAddress();
#Strip the sender out of the To, Cc and AdminCc and set the
# recipients fields used to build the message by the superclass.
# unless a flag is set
- if (RT->Config->Get('NotifyActor')) {
+ my $TransactionCurrentUser = RT::CurrentUser->new;
+ $TransactionCurrentUser->LoadByName($creatorObj->Name);
+ if (RT->Config->Get('NotifyActor',$TransactionCurrentUser)) {
@{ $self->{'To'} } = @To;
@{ $self->{'Cc'} } = @Cc;
@{ $self->{'Bcc'} } = @Bcc;
diff --git a/lib/RT/Action/NotifyGroup.pm b/lib/RT/Action/NotifyGroup.pm
index 6b830cb..131c583 100644
--- a/lib/RT/Action/NotifyGroup.pm
+++ b/lib/RT/Action/NotifyGroup.pm
@@ -84,8 +84,13 @@ sub SetRecipients {
$self->_HandleArgument( $_ );
}
- my $creator = $self->TransactionObj->CreatorObj->EmailAddress();
- unless( $RT::NotifyActor ) {
+ my $creatorObj = $self->TransactionObj->CreatorObj;
+ my $creator = $creatorObj->EmailAddress();
+
+ my $TransactionCurrentUser = RT::CurrentUser->new;
+ $TransactionCurrentUser->LoadByName($creatorObj->Name);
+
+ unless (RT->Config->Get('NotifyActor',$TransactionCurrentUser)) {
@{ $self->{'To'} } = grep ( !/^\Q$creator\E$/, @{ $self->{'To'} } );
}
diff --git a/lib/RT/Config.pm b/lib/RT/Config.pm
index 76c45dc..ed459a5 100644
--- a/lib/RT/Config.pm
+++ b/lib/RT/Config.pm
@@ -349,6 +349,16 @@ our %META = (
]
}
},
+ NotifyActor => {
+ Section => 'Mail', #loc
+ Overridable => 1,
+ SortOrder => 2,
+ Widget => '/Widgets/Form/Boolean',
+ WidgetArguments => {
+ Description => 'Notify Actor', #loc
+ Hints => 'Receive mail from RT for all your actions and correspondence', #loc
+ }
+ },
# this tends to break extensions that stash links in ticket update pages
Organization => {
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list