[Rt-devel] Querybuilder problems.

Ruslan Zakirov ruslan.zakirov at gmail.com
Tue Dec 19 01:24:09 EST 2006


sorry, I missed a level, everything ok with your query. I checked RT
3.6.2 and everything works fine.

On 12/19/06, Matthew Sullivan <matthew at sorbs.net> wrote:
> Ruslan Zakirov wrote:
> > On 12/18/06, Matthew Sullivan <matthew at sorbs.net> wrote:
> >> Any reason why this would fail...
> >>
> >>  Queue != 'DUHL Removals' AND  (  Status = 'new' OR Status = 'open' )
> >> AND Owner = 'Nobody' AND  (  Queue != 'DUHL' OR  (  Subject NOT LIKE
> >> '(Autohandle)' AND Queue = 'DUHL' AND Subject NOT LIKE '(support
> >> form)' ) )
> > From RT point of view it's incorrect query and I don't think it's
> > correct from people view too.
> >
> > From RT point of view problem is in aggregators, on one level of a
> > query you must use only ORs or only ANDs. So "(COND AND COND OR COND)"
> > is incorrect as it's ambiguous, you must write "((COND AND COND) OR
> > COND)" or "(COND AND (COND OR COND))" which are different as you can
> > see.
> >
> > From my point of view you need something like:
> > "Queue != 'DUHL Removals'
> > AND ( Status = 'new' OR Status = 'open' )
> > AND Owner = 'Nobody'
> > AND (
> >  ( Queue != 'DUHL' AND Subject NOT LIKE '(Autohandle)' )
> >  OR ( Queue = 'DUHL' AND Subject NOT LIKE '(support form)'  )
> > )"
>
> It's supposed to read:
>
>       Queue != 'DUHL Removals'
> AND ( Status = 'new' OR Status = 'open' )
> AND   Owner  = 'Nobody'
> AND ( Queue != 'DUHL' OR ( Subject NOT LIKE  '(Autohandle)'
>                            AND Queue = 'DUHL'
>                            AND Subject NOT LIKE '(support form)'
>                          )
>     )
>
> In plain English:
>
> No tickets in the DUHL Removals queue.
> No tickets in the DUHL queue except those without '(Autohandle)' or
> '(support form)' in them.
> All other tickets status "new" or "open" and not owned by anyone.
>
> So there is only one OR on that level.... or am I not understanding?
>
> Regards,
>
> Mat
>


-- 
Best regards, Ruslan.


More information about the Rt-devel mailing list