[rt-users] query problem after 3.4.5 -> 3.6.4 upgrade

Brian Kerr kerrboy at gmail.com
Mon Jul 23 14:29:08 EDT 2007


On 7/23/07, Ruslan Zakirov <ruz at bestpractical.com> wrote:
> Do I understand right that the query is like "Requestor.EmailAddress =
> 'xxx' OR Status = 'new'  OR Status = 'open'"?
> * Note all binary operators (aggregators) are ORs.

The above queries were done with status delimiters.

The query breaks whether or not Status is involved.  Here is one of
the broken queries without Status.  The database query below is
directly from "Requestor.EmailAddress LIKE 'tom' OR Owner = 'tom'"
formed in query builder.


SELECT COUNT(DISTINCT main.id) FROM Tickets main CROSS
JOIN Users Users_3 JOIN Groups Groups_1  ON ( Groups_1.Domain =
'RT::Ticket-Role' ) AND ( Groups_1.Type = 'Requestor' ) AND (
Groups_1.Instance = main.id ) LEFT JOIN CachedGroupMembers
CachedGroupMembers_2  ON ( CachedGroupMembers_2.MemberId = Users_3.id
) AND ( CachedGroupMembers_2.GroupId = Groups_1.id )  WHERE
(main.Status != 'deleted') AND (main.Owner = '58936' OR  (
Users_3.EmailAddress LIKE '%tom%' AND CachedGroupMembers_2.id IS NOT
NULL ) ) AND (main.Type = 'ticket') AND (main.EffectiveId = main.id)



More information about the rt-users mailing list