[Rt-commit] r18556 - rt/3.8/trunk/lib/RT
ruz at bestpractical.com
ruz at bestpractical.com
Tue Feb 24 06:30:45 EST 2009
Author: ruz
Date: Tue Feb 24 06:30:44 2009
New Revision: 18556
Modified:
rt/3.8/trunk/lib/RT/CustomField_Overlay.pm
Log:
* LoadByNameAndQueue should treat numbers the same way other methods do
Modified: rt/3.8/trunk/lib/RT/CustomField_Overlay.pm
==============================================================================
--- rt/3.8/trunk/lib/RT/CustomField_Overlay.pm (original)
+++ rt/3.8/trunk/lib/RT/CustomField_Overlay.pm Tue Feb 24 06:30:44 2009
@@ -308,7 +308,8 @@
my $CFs = RT::CustomFields->new( $self->CurrentUser );
$CFs->SetContextObject( $self->ContextObject );
- $CFs->Limit( FIELD => 'Name', VALUE => $args{'Name'}, CASESENSITIVE => 0);
+ my $field = $args{'Name'} =~ /\D/? 'Name' : 'id';
+ $CFs->Limit( FIELD => $field, VALUE => $args{'Name'}, CASESENSITIVE => 0);
# Don't limit to queue if queue is 0. Trying to do so breaks
# RT::Group type CFs.
if ( defined $args{'Queue'} ) {
More information about the Rt-commit
mailing list