[Rt-commit] r18774 - in rt/3.8/trunk/etc: upgrade/3.8.3
ruz at bestpractical.com
ruz at bestpractical.com
Thu Mar 12 21:26:41 EDT 2009
Author: ruz
Date: Thu Mar 12 21:26:41 2009
New Revision: 18774
Modified:
rt/3.8/trunk/etc/initialdata
rt/3.8/trunk/etc/upgrade/3.8.3/content
Log:
* notify action with argument equal to 'All' sends notifications
to owner as well, let's clear descriptions
Modified: rt/3.8/trunk/etc/initialdata
==============================================================================
--- rt/3.8/trunk/etc/initialdata (original)
+++ rt/3.8/trunk/etc/initialdata Thu Mar 12 21:26:41 2009
@@ -68,12 +68,12 @@
ExecModule => 'Notify',
Argument => 'Requestor,Cc' },
- { Name => 'Notify Requestors, Ccs and AdminCcs as Comment', # loc
- Description => 'Send mail to all watchers as a "comment"', # loc
+ { Name => 'Notify Owner, Requestors, Ccs and AdminCcs as Comment', # loc
+ Description => 'Send mail to owner and all watchers as a "comment"', # loc
ExecModule => 'NotifyAsComment',
Argument => 'All' },
- { Name => 'Notify Requestors, Ccs and AdminCcs', # loc
- Description => 'Send mail to all watchers', # loc
+ { Name => 'Notify Owner, Requestors, Ccs and AdminCcs', # loc
+ Description => 'Send mail to owner and all watchers', # loc
ExecModule => 'Notify',
Argument => 'All' },
{ Name => 'Notify Other Recipients as Comment', # loc
Modified: rt/3.8/trunk/etc/upgrade/3.8.3/content
==============================================================================
--- rt/3.8/trunk/etc/upgrade/3.8.3/content (original)
+++ rt/3.8/trunk/etc/upgrade/3.8.3/content Thu Mar 12 21:26:41 2009
@@ -30,6 +30,51 @@
$RT::Logger->debug("Canonicalized ACLs in the DB.");
return 1;
},
+ sub {
+ $RT::Logger->debug("Going to correct descriptions of notify actions in the DB");
+ my $sys = RT::System->new($RT::SystemUser);
+
+ my $actions = RT::ScripActions->new( $RT::SystemUser );
+ $actions->Limit(
+ FIELD => 'ExecModule',
+ VALUE => 'Notify',
+ );
+ $actions->Limit(
+ FIELD => 'Argument',
+ VALUE => 'All',
+ );
+ while ( my $action = $actions->Next ) {
+ my ($status, $msg) = $action->__Set( Field => 'Name', Value => 'Notify Owner, Requestors, Ccs and AdminCcs' );
+ $RT::Logger->warning( "Couldn't change action name: $msg" )
+ unless $status;
+
+ ($status, $msg) = $action->__Set( Field => 'Description', Value => 'Send mail to owner and all watchers' );
+ $RT::Logger->warning( "Couldn't change action description: $msg" )
+ unless $status;
+ }
+
+ $actions = RT::ScripActions->new( $RT::SystemUser );
+ $actions->Limit(
+ FIELD => 'ExecModule',
+ VALUE => 'NotifyAsComment',
+ );
+ $actions->Limit(
+ FIELD => 'Argument',
+ VALUE => 'All',
+ );
+ while ( my $action = $actions->Next ) {
+ my ($status, $msg) = $action->__Set( Field => 'Name', Value => 'Notify Owner, Requestors, Ccs and AdminCcs as Comment' );
+ $RT::Logger->warning( "Couldn't change action name: $msg" )
+ unless $status;
+
+ ($status, $msg) = $action->__Set( Field => 'Description', Value => 'Send mail to owner and all watchers as a "comment"' );
+ $RT::Logger->warning( "Couldn't change action description: $msg" )
+ unless $status;
+ }
+
+ $RT::Logger->debug("Corrected descriptions of notify actions in the DB.");
+ return 1;
+ },
);
More information about the Rt-commit
mailing list