[Rt-commit] r12809 - in rt/branches/3.8-TESTING: .

alexmv at bestpractical.com alexmv at bestpractical.com
Mon Jun 2 15:10:49 EDT 2008


Author: alexmv
Date: Mon Jun  2 15:10:33 2008
New Revision: 12809

Modified:
   rt/branches/3.8-TESTING/   (props changed)
   rt/branches/3.8-TESTING/lib/RT/Tickets_Overlay.pm

Log:
 r32380 at kohr-ah:  chmrr | 2008-06-02 15:10:04 -0400
  * Warning suppression for order-by a CF with no queue given


Modified: rt/branches/3.8-TESTING/lib/RT/Tickets_Overlay.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/Tickets_Overlay.pm	(original)
+++ rt/branches/3.8-TESTING/lib/RT/Tickets_Overlay.pm	Mon Jun  2 15:10:33 2008
@@ -1139,21 +1139,21 @@
         }
     } 
     if (!$queue) {
+        $queue = '';
+        my $cfs = RT::CustomFields->new( $self->CurrentUser );
+        $cfs->Limit( FIELD => 'Name', VALUE => $field );
+        $cfs->LimitToLookupType('RT::Queue-RT::Ticket');
+        my $count = $cfs->Count;
 
-    my $cfs = RT::CustomFields->new( $self->CurrentUser );
-    $cfs->Limit( FIELD => 'Name', VALUE => $field );
-    $cfs->LimitToLookupType('RT::Queue-RT::Ticket');
-    my $count = $cfs->Count;
-
-    if ($count > 1) { $cf = $cfs->First}
-    elsif ($count == 0 ) { $cf = undef }
+        if ($count > 1) { $cf = $cfs->First}
+        elsif ($count == 0 ) { $cf = undef }
     }
 
 
     return ($queue, $field, $cf, $column);
 
 }
- 
+
 =head2 _CustomFieldJoin
 
 Factor out the Join of custom fields so we can use it for sorting too
@@ -1271,8 +1271,7 @@
 
     my ($queue, $cfid, $cf, $column);
     ($queue, $field, $cf, $column) = $self->_CustomFieldDecipher( $field );
-
-            $cfid = $cf ? $cf->id  : 0 ;
+    $cfid = $cf ? $cf->id  : 0 ;
 
 
 # If we're trying to find custom fields that don't match something, we


More information about the Rt-commit mailing list