[rt-users] Searching with multiple custom fields
Chris Black
chrisb at webreachinc.com
Mon Sep 26 12:16:25 EDT 2005
Good Morning,
I'm trying to do a search with multiple custom fields in RT 3.4.1.
Here is the SQL that RT is generating:
SELECT DISTINCT main.* FROM ((Tickets main LEFT JOIN
ObjectCustomFieldValues ObjectCustomFieldValues_1 ON
((ObjectCustomFieldValues_1.ObjectType = 'RT::Ticket')) AND
( (ObjectCustomFieldValues_1.Disabled = '0')) AND
( ObjectCustomFieldValues_1.ObjectId = main.id)) JOIN CustomFields
CustomFields_2 ON ( CustomFields_2.id =
ObjectCustomFieldValues_1.CustomField) AND( (CustomFields_2.Name =
'Clients'))) WHERE ((main.EffectiveId = main.id)) AND
((main.Status != 'deleted')) AND ((main.Type = 'ticket')) AND
((main.Owner = '359')AND(ObjectCustomFieldValues_1.Content LIKE '%
BCBS KS%')AND(ObjectCustomFieldValues_1.Content LIKE '%Yes%')AND
(ObjectCustomFieldValues_1.Content LIKE '%Minimal%')AND(main.Status =
'open')AND(ObjectCustomFieldValues_1.Content LIKE '%QA%')AND
(ObjectCustomFieldValues_1.Content LIKE '%Application Deploy or Config
%')AND(ObjectCustomFieldValues_1.Content LIKE '%Not Required%')AND
(ObjectCustomFieldValues_1.Content LIKE '%Yes%')) ORDER BY main.id ASC
However this returns 0 tickets. In if it was working correctly it
should return 1 ticket, as I have created one ticket with all these
fields selected. Is this a bug or am I just doing something wrong?
Thanks,
Chris Black
Jr. Systems Administrator
Cell: 515-229-9282
Office: 949-474-9712 Ext. 223
AIM: blackc2004
chrisb at webreachinc.com
More information about the rt-users
mailing list