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

Jesse Vincent jesse at bestpractical.com
Tue Feb 14 17:07:24 EST 2006




On Tue, Feb 14, 2006 at 05:02:19PM -0500, Stephen Turner wrote:
> [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.

This is the wrong -place to fix this, as I know there are folks using
that behaviour to get exactly what they seem to be asking for. "All
custom field values" for that ticket.
> 
> Steve
> 
> 
> --- 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);
>  }
> 
> _______________________________________________
> Rt-devel mailing list
> Rt-devel at lists.bestpractical.com
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel
> 

-- 


More information about the Rt-devel mailing list