[Rt-commit] rt branch, 3.8-trunk, updated. rt-3.8.5-241-ge009b7b
Alex M Vandiver
alexmv at bestpractical.com
Mon Oct 5 12:56:22 EDT 2009
The branch, 3.8-trunk has been updated
via e009b7b62b8b82eb86d240404a6e17dddbcde4fb (commit)
from 784b03f1934f461b2cbe4ae09a5fb1699000376d (commit)
Summary of changes:
lib/RT/Test.pm | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit e009b7b62b8b82eb86d240404a6e17dddbcde4fb
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Mon Oct 5 12:56:16 2009 -0400
Allow callers to provide a currentuser or user to RT::Test->last_ticket
diff --git a/lib/RT/Test.pm b/lib/RT/Test.pm
index bea6402..a4d4b96 100644
--- a/lib/RT/Test.pm
+++ b/lib/RT/Test.pm
@@ -513,7 +513,9 @@ sub load_or_create_custom_field {
sub last_ticket {
my $self = shift;
- my $tickets = RT::Tickets->new( $RT::SystemUser );
+ my $current = shift;
+ $current = $current ? RT::CurrentUser->new($current) : $RT::SystemUser;
+ my $tickets = RT::Tickets->new( $current );
$tickets->OrderBy( FIELD => 'id', ORDER => 'DESC' );
$tickets->Limit( FIELD => 'id', OPERATOR => '>', VALUE => '0' );
$tickets->RowsPerPage( 1 );
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list