[Rt-devel] Querybuilder problems.

Ruslan Zakirov ruslan.zakirov at gmail.com
Mon Dec 18 20:07:53 EST 2006


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)'  )
)"

[snip]

> Regards
>
> Mat

-- 
Best regards, Ruslan.


More information about the Rt-devel mailing list