[rt-devel] Issues with RT-3.0.10 and DBIx::SearchBuilder 0.99

Ruslan U. Zakirov cubic at acronis.ru
Thu Apr 22 09:01:19 EDT 2004


I also have this issue with SB 0.99 and 3.0.9, I did fallback to SB 0.97.

Manuel de Ferran wrote:

> Finally, we've found why we got a full list of users when we tried to 
> add a new member to a group.
> 
> We didn't have that problem, with RT-3.0.9 and DBIx::SearchBuilder 0.97.
> 
> We tracked down the call to 
> share/html/Admin/Elements/SelectNewGroupMembers. Next we enabled the 
> logging in mysql. It appeared that the requests are different between 
> DBIx::SearchBuilder 0.97 and the newest one.
> 
> Here are the sql requests on RT-3.0.10 with DBIx::SearchBuilder 0.97 and 
> on RT-3.0.10 with DBIx::SearchBuilder 0.99 :
> 
> #DBIx::SearchBuilder 0.97
> SELECT DISTINCT main.* FROM
>    Users main,
>    Principals Principals_1,
>    CachedGroupMembers CachedGroupMembers_2
> WHERE ((CachedGroupMembers_2.GroupId = '4'))
>    AND ((Principals_1.Disabled = '0'))
>    AND ((Principals_1.PrincipalType = 'User'))
>    AND ((main.id != '1')or(main.id != '10'))
>    AND main.id = Principals_1.id
>    AND Principals_1.id = CachedGroupMembers_2.MemberId
> ORDER BY main.Name ASC;
> 
> 
> #DBIx::SearchBuilder 0.99
> SELECT DISTINCT main.* FROM
>    Users main,
>    Principals Principals_1,
>    CachedGroupMembers CachedGroupMembers_2
> WHERE ((CachedGroupMembers_2.GroupId = '4'))
>    AND ((Principals_1.Disabled = '0'))
>    AND ((Principals_1.PrincipalType = 'User'))
>    AND ((Principals_1.id = CachedGroupMembers_2.MemberId))
>    AND ((main.id = Principals_1.id)or(main.id != '1')or(main.id != '10'))
> ORDER BY main.Name ASC;

ORs are wrong. IMHO It should be ANDs.


> 
> 
> I doubt they're equivalent.
> 
> Should I downgrade to 0.97 ? Is there any other way to fix it ?
> 
> Regards,
> 
> Manuel
> _______________________________________________
> 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