[rt-users] searching "select multiple" Custom field

Roy Sowa Roy.Sowa at rcmp-grc.gc.ca
Tue Jan 29 12:45:40 EST 2008

I only want to return tickets that have both of the values in a ticket , not one OR the other.
I failed to mention that when I use the AND as in my original post , I return Zero hits as if the query cannot be satisfied.
but there are single tickets that have only both the criteria selected.
When I use the OR as you suggest , I get all tickets that contain either of the criteria ...not only those that have both.


>>> Kenneth Crocker <KFCrocker at lbl.gov> 29/01/2008 12:12 pm >>>

	You might get better results if your last "AND" (CF.FOO like xxxx AND 
CF.FOO like xxx) was an "OR". Your query will only pull those tickets if 
that CF has BOTH values. Since you stated the values could be anywhere 
from AAA to FFF, then perhaps you would want ANY ticket that has either 
of the values you are looking for. Just a thought.


On 1/29/2008 5:29 AM, Roy Sowa wrote:
> I have a queue specific custom field that may contain multiple values. (AAA....FFF)
> If I have a ticket which has set multiple values for that custom field 
> then I do not find the ticket when I specify a search criteria that 
> contains multiple values for that custom field.
>  Eg: 
> The custom field  ( FOO ) may contain the values "AAA" and "CCC".
>  My ticket has set both values. The search criteria is: 
>  Queue = 'TEST' AND  (  Status = 'open' OR Status = 'new' OR Status = 'stalled'  ) AND 'CF.{FOO}' LIKE 'AAA' AND 'CF.{FOO}' LIKE CCC'
> If I search for one of the criteria then those tickets are found. 
> The  ticket is not found if I look for "AAA" and "CCC".  ( tickets with this match do exist in the database ) 
> I am running 3.6.5.
> Am I missing something, how do I search for those records that only contain both 'AAA' and 'CCC'
> Roy
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users 
> Community help: http://wiki.bestpractical.com 
> Commercial support: sales at bestpractical.com 
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
> Buy a copy at http://rtbook.bestpractical.com 

More information about the rt-users mailing list