[Rt-devel] Custom Field Search Bug (3.4.2, 3.4.5)

Jesse Vincent jesse at bestpractical.com
Wed Jan 25 10:47:37 EST 2006




On Wed, Jan 25, 2006 at 10:44:46AM -0500, Stephen Turner wrote:
> I think we've found a bug in custom field searching - I can't offer a 
> patch, but here's what I've found out.
> 
> The versions I've seen this on are 3.4.2 and 3.4.5.
> 

We've done a _lot_ of work on searching in 3.5. It'd be great if someone
could test this on 3.5.7

> Here's the sql generated by the search (prettied up a bit):
> 
> SELECT *
> FROM
> ( SELECT limitquery.*,rownum limitrownum FROM
> ( SELECT main.* FROM ( SELECT DISTINCT main.id FROM
> ((Tickets main
>       LEFT JOIN CustomFields CustomFields_1 ON ( CustomFields_1.Name = 
> 'Software Version'))
>       LEFT JOIN ObjectCustomFieldValues ObjectCustomFieldValues_2
>           ON ( ObjectCustomFieldValues_2.CustomField = CustomFields_1.id)
>           AND( (ObjectCustomFieldValues_2.Disabled = '0'))
>           AND( (ObjectCustomFieldValues_2.ObjectId = main.id))
>           AND( (ObjectCustomFieldValues_2.ObjectType = 'RT::Ticket')))
> WHERE
> ((main.EffectiveId = main.id)) AND ((main.Status != 'deleted')) AND
> ((main.Type = 'ticket')) AND ((main.Queue = '953')AND (
> (ObjectCustomFieldValues_2.Content NOT LIKE '%R14%')
> OR(ObjectCustomFieldValues_2.Content IS NULL) ) )  ) distinctquery, Tickets
> main WHERE (main.id = distinctquery.id)    ORDER BY main.id ASC  )
> limitquery WHERE rownum <= 50 ) WHERE limitrownum >= 1
> 
> 
> Steve
> 
> _______________________________________________
> 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