[Rt-devel] RT 3.4.2 Bug & Patch - Incorrect Custom Field Values in Search Results

Stephen Turner sturner at MIT.EDU
Tue Feb 14 17:02:19 EST 2006

[RT 3.4.2]

Found a small bug that showed in the Search results page when searching for 
tickets in multiple queues. If a custom field is defined for some but not 
all of the search queues, and the custom field column is included in the 
results, then for each ticket in  a queue where the CF does not appear, the 
tickets other CF values are shown.

This patch to Ticket_Overlay.pm seems to fix it. Without the patch, if the 
ticket's queue does not have the CF, $field is null when 
SUPER::CustomFieldValues($field) is called and this appears to grab CF 
values for all the ticket's CFs.


--- Ticket_Overlay.pm.orig      2006-02-14 16:50:04.000000000 -0500
+++ Ticket_Overlay.pm   2006-02-14 16:50:32.000000000 -0500
@@ -3659,6 +3659,8 @@
              $cf->LoadByNameAndQueue( Name => $field, Queue => '0' );
          $field = $cf->id;
+       return RT::ObjectCustomFieldValues->new( $self->CurrentUser )
+           unless $cf->id;
      return $self->SUPER::CustomFieldValues($field);

More information about the Rt-devel mailing list