[rt-users] Query Builder documentation

Matthew Watson matthew.watson at staff.netspace.net.au
Mon Jan 31 01:46:13 EST 2005


Hi,

 

FYI. RT 3.2.2

 

 I was wondering if anyone has written up documentation for using the
Query builder (couldn't really find anything useful in the wiki).

 

I somewhat understand how it works, although it still seems to do
unexpected things at times, or just plan refuses to do them at other
times, and if I'm having issues then I'm sure our accounts people are
too :-)

 

It seems fine for doing a query full of "AND"'s or "OR"'s, but once you
start mixing them, you need to shuffle it around a lot to get the query
how you want it, and sometimes it seems impossible to get it how you
want it..

 

Even using the advanced builder doesn't always do what I would expect,

 

An example, I would think I should be able to build this

 

Owner = 'Nobody' 

AND ( Status = 'new'  or Status = 'open' ) 

AND (  Queue = 'Bugs'  

OR Queue = 'Faults'  ) 

AND (  LastUpdated < 'Today'  

          OR ( Due > '1970-01-01'  AND LastUpdated > 'Yesterday' ) )

 

However, when I apply this, I end up with

 

Owner = 'Nobody'  

AND ( Status = 'new'  or Status = 'open' ) 

AND ( Queue = 'Bugs'  OR Queue = 'Faults' ) 

AND ( LastUpdated < 'Today'  AND ( Due > '1970-01-01'  AND LastUpdated >
'Yesterday' ) )

 

Almost there, except the OR between LastUpdated and Due has been
converted into an AND, and nothing I do will let me change it back.
Perhaps its just that nesting like that is not allowed, but if that is
the case, an error would be nice rather than it happily changing the
query? Actually building this query using the "graphical" builder is a
major lesson in frustration, as bits of the query jump all over the
place while trying to group parts of the query and  "AND"'s turn to "OR"
and visa versa for no apparent reason.

 

 

So, the question really is, I'm I just not understanding how to
correctly use the query builder, or is it flawed (and if so, is it fixed
in 3.4)? If it's the former, does anyone have the documentation so I can
explain to all our staff how to successfully build complex queries?

 

Ps.. sorry for the rant :-)

 

 

Regards

 

--

Matthew Watson

Netspace Online Systems

(03) 98110010

 


This email and any files transmitted with it are confidential and intended solely for the 
use of the individual or entity to whom they are addressed. Please notify the sender 
immediately by email if you have received this email by mistake and delete this email 
from your system. Please note that any views or opinions presented in this email are solely
 those of the author and do not necessarily represent those of the organisation. 
Finally, the recipient should check this email and any attachments for the presence of 
viruses. The organisation accepts no liability for any damage caused by any virus 
transmitted by this email. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20050131/a1fe6573/attachment.htm>


More information about the rt-users mailing list