[rt-users] RT 3.6 query - possible bug?
Stephen Turner
sturner at MIT.EDU
Wed Jan 9 11:40:23 EST 2008
We've found a difference between 3.4.2 and 3.6.5 that seems like a
bug - we have a query that returns different results.
One of our queues has a custom field called 'Alt. Email/Phone' so
that alternate requestor contact info can be recorded in the ticket.
Our users need to include this custom field in requestor searches
that cross different queues, including queues that don't have the
custom field. The WHERE clause is like this:
WHERE Requestor.EmailAddress LIKE 'sturner'
OR Requestor.Name LIKE 'sturner'
OR 'CF.{Alt. Email/Phone}' LIKE 'sturner'
This will get tickets for 'sturner' in any queue whether or not that
queue has a 'Alt. Email/Phone' custom field. The last part of the
clause is interpreted by RT to mean:
"OR where the 'Alt. Email/Phone' is defined for the ticket queue and
the value contains 'sturner' ''
However, RT 3.6.5 will only return tickets in the queue with the
custom field defined. Any tickets outside this queue with requestor =
'sturner' will not be returned.
The difference seems to be that in 3.4, there's an outer join
somewhere in the custom field part of the query, and in 3.6 there is
instead a simple join. The 3.6 interpretation of the query is
WHERE custom field 'Alt. Email/Phone' is defined for the queue AND
(Requestor.EmailAddress LIKE 'sturner'
OR Requestor.Name LIKE 'sturner'
OR 'CF.{Alt. Email/Phone}' LIKE 'sturner')
Is this a bug? Is there a work around?
Steve
Stephen Turner
Senior Programmer/Analyst - Client Support Services
MIT Information Services and Technology (IS&T)
More information about the rt-users
mailing list