[Rt-devel] BUG: Search Builder link searching

Todd Chapman todd at chaka.net
Tue Dec 6 15:05:33 EST 2005


On Tue, Dec 06, 2005 at 02:13:01PM -0500, Jesse Vincent wrote:
> 
> 
> 
> On Tue, Dec 06, 2005 at 02:47:35PM -0500, Todd Chapman wrote:
> > When building a search and choosing the "LinkedTo" link
> > type all tickets are returned. This is 3.4.HEAD. Anyone else
> > seee the same problem?
> 
> It'd help to know what the TicketSQL query it's generating is and
> whether that query fails when it's run in the test suite

Of course. :)

Ticket SQL:

 LinkedTo = '2'

MySQL Query:

SELECT count(main.id) FROM Tickets main   WHERE ((main.EffectiveId = main.id)) AND ((main.Status != 'deleted')) AND ((main.Type = 'ticket'))

In contrast

Ticket SQL:

 RefersTo = '2'

MySQL Query:

SELECT COUNT(DISTINCT main.id) FROM Tickets main , Links Links_1  WHERE ((main.EffectiveId = main.id)) AND ((main.Status != 'deleted')) AND ((main.Type = 'ticket')) AND ( ( (Links_1.Type = 'RefersTo')AND(Links_1.LocalTarget = '2')AND(main.id = Links_1.LocalBase) ) )

> 
> > 
> > -Todd
> > _______________________________________________
> > 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