[Rt-commit] rt branch, 3.8-trunk, updated. rt-3.8.5-156-g221b985
jesse
jesse at bestpractical.com
Tue Sep 29 14:22:20 EDT 2009
The branch, 3.8-trunk has been updated
via 221b9853f811a7dfed062e21709300a0162576d4 (commit)
via 1338318952f9a639544504b34b245573123339ff (commit)
via 2f8fe147a34da96d642880873fb984baf86a5cb3 (commit)
via f960fe192752a49c576599b5969e020d0c395875 (commit)
via 9bbd8b31b7f3404c10d61b2edc40dede7c6666a6 (commit)
via e2ec2c4c59168ee0fb8fe72c869d0fc16af84590 (commit)
from c741116ebdd8e227cfd4c05e716a5a2a8fd86c07 (commit)
Summary of changes:
lib/RT/Action/LinearEscalate.pm | 4 ++--
lib/RT/Shredder/Record.pm | 2 +-
lib/RT/Ticket_Overlay.pm | 2 +-
lib/RT/Users_Overlay.pm | 2 +-
share/html/autohandler | 20 +-------------------
t/ticket/linking.t | 2 +-
6 files changed, 7 insertions(+), 25 deletions(-)
- Log -----------------------------------------------------------------
commit e2ec2c4c59168ee0fb8fe72c869d0fc16af84590
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Wed Sep 30 02:52:53 2009 +0900
We've had an API for getting writable attributes on a record for years.
let's use it
diff --git a/share/html/autohandler b/share/html/autohandler
index fe15c2f..6729ba7 100755
--- a/share/html/autohandler
+++ b/share/html/autohandler
@@ -137,26 +137,8 @@ elsif ( RT->Config->Get('WebExternalAuth') ) {
= RT::Interface::Web::WebExternalAutoInfo($user);
# set the attributes that have been defined.
- # FIXME: this is a horrible kludge. I'm sure there's something cleaner
- foreach my $attribute (
- 'Name', 'Comments',
- 'Signature', 'EmailAddress',
- 'PagerEmailAddress', 'FreeformContactInfo',
- 'Organization', 'Disabled',
- 'Privileged', 'RealName',
- 'NickName', 'Lang',
- 'EmailEncoding', 'WebEncoding',
- 'ExternalContactInfoId', 'ContactInfoSystem',
- 'ExternalAuthId', 'Gecos',
- 'HomePhone', 'WorkPhone',
- 'MobilePhone', 'PagerPhone',
- 'Address1', 'Address2',
- 'City', 'State',
- 'Zip', 'Country'
- )
- {
+ foreach my $attribute ($user->WritableAttributes) {
$m->callback( Attribute => $attribute, User => $user, UserInfo => $new_user_info, CallbackName => 'NewUser' );
-
my $method = "Set$attribute";
$UserObj->$method( $new_user_info->{$attribute} )
if defined $new_user_info->{$attribute};
commit 9bbd8b31b7f3404c10d61b2edc40dede7c6666a6
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Wed Sep 30 03:03:57 2009 +0900
Fixed a messed up migration to RT::Test
diff --git a/t/ticket/linking.t b/t/ticket/linking.t
index d065aee..2ea3d58 100644
--- a/t/ticket/linking.t
+++ b/t/ticket/linking.t
@@ -2,6 +2,7 @@
use strict;
use warnings;
+use RT::Test tests => '101';
use_ok('RT');
use_ok('RT::Ticket');
use_ok('RT::ScripConditions');
@@ -9,7 +10,6 @@ use_ok('RT::ScripActions');
use_ok('RT::Template');
use_ok('RT::Scrips');
use_ok('RT::Scrip');
-use RT::Test tests => '101';
use File::Temp qw/tempfile/;
commit f960fe192752a49c576599b5969e020d0c395875
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Wed Sep 30 03:05:10 2009 +0900
warnings avoidance in LinearEscalate.pm
diff --git a/lib/RT/Action/LinearEscalate.pm b/lib/RT/Action/LinearEscalate.pm
index 8051096..9130f40 100755
--- a/lib/RT/Action/LinearEscalate.pm
+++ b/lib/RT/Action/LinearEscalate.pm
@@ -163,7 +163,7 @@ sub Prepare {
return 1;
}
- my $priority_range = $ticket->FinalPriority - $ticket->InitialPriority;
+ my $priority_range = ($ticket->FinalPriority ||0) - ($ticket->InitialPriority ||0);
unless ( $priority_range ) {
$RT::Logger->debug('Final and Initial priorities are equal. Not escalating.');
return 1;
@@ -197,7 +197,7 @@ sub Prepare {
my $percent_complete = ($now-$starts)/($due - $starts);
- my $new_priority = int($percent_complete * $priority_range) + $ticket->InitialPriority;
+ my $new_priority = int($percent_complete * $priority_range) + ($ticket->InitialPriority || 0);
$new_priority = $ticket->FinalPriority if $new_priority > $ticket->FinalPriority;
$self->{'new_priority'} = $new_priority;
commit 2f8fe147a34da96d642880873fb984baf86a5cb3
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Wed Sep 30 03:05:23 2009 +0900
Move a "deleted this record" notification from warning to info
diff --git a/lib/RT/Shredder/Record.pm b/lib/RT/Shredder/Record.pm
index 4ce68c8..94208a2 100644
--- a/lib/RT/Shredder/Record.pm
+++ b/lib/RT/Shredder/Record.pm
@@ -233,7 +233,7 @@ sub __Wipeout
my $self = shift;
my $msg = $self->_AsString ." wiped out";
$self->SUPER::Delete;
- $RT::Logger->warning( $msg );
+ $RT::Logger->info( $msg );
return;
}
commit 1338318952f9a639544504b34b245573123339ff
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Wed Sep 30 03:05:45 2009 +0900
Quiet down some warnings in TXNBatch processing
diff --git a/lib/RT/Ticket_Overlay.pm b/lib/RT/Ticket_Overlay.pm
index c91f209..2fcdd2b 100755
--- a/lib/RT/Ticket_Overlay.pm
+++ b/lib/RT/Ticket_Overlay.pm
@@ -3200,7 +3200,7 @@ sub _ApplyTransactionBatch {
my $batch = $self->TransactionBatch;
my %seen;
- my $types = join ',', grep !$seen{$_}++, map $_->Type, grep defined, @{$batch};
+ my $types = join ',', grep !$seen{$_}++, grep defined, map $_->Type, grep defined, @{$batch};
require RT::Scrips;
RT::Scrips->new($RT::SystemUser)->Apply(
commit 221b9853f811a7dfed062e21709300a0162576d4
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Wed Sep 30 03:05:56 2009 +0900
drop a warning about rights that should only be hit in dev down from crit to error
diff --git a/lib/RT/Users_Overlay.pm b/lib/RT/Users_Overlay.pm
index 54b5d44..a2d235c 100755
--- a/lib/RT/Users_Overlay.pm
+++ b/lib/RT/Users_Overlay.pm
@@ -300,7 +300,7 @@ sub _JoinACL
if ( $args{'Right'} ) {
my $canonic = RT::ACE->CanonicalizeRightName( $args{'Right'} );
unless ( $canonic ) {
- $RT::Logger->crit("Invalid right. Couldn't canonicalize right '$args{'Right'}'");
+ $RT::Logger->error("Invalid right. Couldn't canonicalize right '$args{'Right'}'");
}
else {
$args{'Right'} = $canonic;
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list