[Rt-commit] r17351 - rt/3.8/trunk/lib/RT
clkao at bestpractical.com
clkao at bestpractical.com
Thu Dec 25 02:10:52 EST 2008
Author: clkao
Date: Thu Dec 25 02:10:51 2008
New Revision: 17351
Modified:
rt/3.8/trunk/lib/RT/Ticket_Overlay.pm
Log:
Allow Ticket->Create to process owner as email.
Modified: rt/3.8/trunk/lib/RT/Ticket_Overlay.pm
==============================================================================
--- rt/3.8/trunk/lib/RT/Ticket_Overlay.pm (original)
+++ rt/3.8/trunk/lib/RT/Ticket_Overlay.pm Thu Dec 25 02:10:51 2008
@@ -394,7 +394,9 @@
#If we've been handed something else, try to load the user.
elsif ( $args{'Owner'} ) {
$Owner = RT::User->new( $self->CurrentUser );
- $Owner->Load( $args{'Owner'} );
+ $args{'Owner'} =~ /^\S+@\S+$/
+ ? $Owner->LoadByEmail($args{'Owner'})
+ : $Owner->Load( $args{'Owner'} );
unless ( $Owner->Id ) {
push @non_fatal_errors,
$self->loc("Owner could not be set.") . " "
More information about the Rt-commit
mailing list