[rt-users] TicketSQL, QueryBuilder search construction for returning ticketid's which don't have a specifc Requestor.Name

Schultz, Eric ESchultz at corp.untd.com
Wed Apr 12 11:15:55 EDT 2006


 

> -----Original Message-----
> From: rt-users-bounces at lists.bestpractical.com 
> [mailto:rt-users-bounces at lists.bestpractical.com] On Behalf 
> Of Alex Strachan
> Sent: Tuesday, April 11, 2006 9:31 PM
> To: rt-users at lists.bestpractical.com
> Subject: [rt-users] TicketSQL,QueryBuilder search 
> construction for returning ticketid's which don't have a 
> specifc Requestor.Name
> 
> TicketSQL question when searching on Requestor.Name.  I have 
> reviewed the
> Wiki and the RT book but been unable to construct a TicketSQL 
> statement to
> return my requirements.
> 
> The QueryBuilder shows the same result set.  Is it something 
> to do with
> joins?
> 
> OS: RHES4, RT: 3.4.5
> 
> Setup:
>   ticket/100  contains
>   Requestors: ReqA, ReqB
>  
>   ticket/101 contains
>   Requestors: ReqA
>  
> Command:
>   rt list -i "Requestor.Name != 'ReqB'"
>   ->ticket/100
>   ->ticket/101
> 
> What is the TicketSQL construct that would return ticket/101 only ?   
> 
> 
> Using LIKE, NOT LIKE I'm still unable to return the single ticket.
> 
>  
> Alex Strachan

It has to do with how the schema is set up.  I ran into the same
problem, and unfortunately, there doesn't appear to be a solution other
than refactoring the DB schema.  In fact, I filed a bug for this:
http://rt3.fsck.com/Ticket/Display.html?id=7197.  You'll see the kind of
queries I am trying to do there.  It wasn't working in any of the 3.4.x
or 3.5.x code.  I had thought that something like doing a UNION
somewhere in the query might be the solution, but I hadn't sat down to
think it through.  The problem is getting that into the searchbuilder
code abstractly.

Eric Schultz
United Online



More information about the rt-users mailing list