[rt-users] search query returning unexpected results

Kevin Falcone falcone at bestpractical.com
Wed Sep 3 17:07:32 EDT 2014


On Tue, Aug 26, 2014 at 02:05:41PM -0700, Chanel Wheeler wrote:
> This is the search query I have (built via the Query Builder):
> 
> Owner = 'cwheeler' AND (  Status = 'new' OR Status = 'open' ) AND Queue = 'YLN'
> AND 'CF.{YLN Topic}' != 'Student Import System'
> 
> The search results *include* the tickets tagged with Student Import System. If
> I change the ‘not equal’ to ‘equal’ it limits the search as you’d expect it to.
> Same thing happens with LIKE vs NOT LIKE. This is looking a lot like a bug but
> I’m wondering if manipulating custom fields in this way just isn’t allowed. 
> I’m on 4.2.6.

You neglected to tell us what kind of Custom Field YLN Topic is.

If I make a global CF called Foo and make it an enter one value and
have two tickets, one where Foo has no value and one where Foo has the
value foo and I ask for
    CF.foo != 'foo'
I correctly get 1 ticket.

You can find the code I posted earlier today for seeing the SQL
generated by a query and run that and show us what you get for your !=
query.

-kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 221 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20140903/9cc2e90d/attachment.sig>


More information about the rt-users mailing list