[Rt-commit] r10613 - in rt/branches/3.999-DANGEROUS: lib/RT/Model

ruz at bestpractical.com ruz at bestpractical.com
Wed Jan 30 19:51:23 EST 2008


Author: ruz
Date: Wed Jan 30 19:51:22 2008
New Revision: 10613

Modified:
   rt/branches/3.999-DANGEROUS/lib/RT/Model/TicketCollection.pm
   rt/branches/3.999-DANGEROUS/t/ticket/search_by_watcher.t

Log:
* fix t/ticket/search_by_watcher.t

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/TicketCollection.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/TicketCollection.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/TicketCollection.pm	Wed Jan 30 19:51:22 2008
@@ -794,7 +794,7 @@
     # Owner was ENUM field, so "Owner = 'xxx'" allowed user to
     # search by id and name at the same time, this is workaround
     # to preserve backward compatibility
-    if ( $field eq 'Owner' && !$rest{subkey} && $op =~ /^!?=$/ ) {
+    if ( lc $field eq 'owner' && !$rest{subkey} && $op =~ /^!?=$/ ) {
         my $o = RT::Model::User->new;
         $o->load($value);
         $self->_sql_limit(

Modified: rt/branches/3.999-DANGEROUS/t/ticket/search_by_watcher.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/ticket/search_by_watcher.t	(original)
+++ rt/branches/3.999-DANGEROUS/t/ticket/search_by_watcher.t	Wed Jan 30 19:51:22 2008
@@ -201,7 +201,7 @@
     my $u = RT::Model::User->new(current_user => RT->system_user );
     $u->load_or_create_by_email('alpha at example.com');
     ok($u->id, "loaded user");
-    @data = ( { subject => '4', Owner => $u->id } );
+    @data = ( { subject => '4', owner => $u->id } );
     my($t) = add_tix_from_data();
     is( $t->owner, $u->id, "Created ticket with custom owner" );
     my $u_alpha_id = $u->id;
@@ -209,7 +209,7 @@
     $u = RT::Model::User->new(current_user => RT->system_user );
     $u->load_or_create_by_email('bravo at example.com');
     ok($u->id, "loaded user");
-    @data = ( { subject => '5', Owner => $u->id } );
+    @data = ( { subject => '5', owner => $u->id } );
     ($t) = add_tix_from_data();
     is( $t->owner, $u->id, "Created ticket with custom owner" );
     my $u_bravo_id = $u->id;


More information about the Rt-commit mailing list