Problem searching on a particular custom field

In our RT 3.4.4 setup, there is one queue with the following custom field:

“Closed Because” of style "select one"
With possible values:
“Done”
“Duplicate”
“Won’t do - can’t reproduce”
“Won’t do - it works as advertised”
“Won’t do - not our fault”
“Won’t do - might reconsider in the future”
“Spam, Virus, etc”

Since our custom fields are coming from upgrades from older RT versions,
all of them are global, and there are different ones with the same name
that are used in different queues.

We have terrible problems using this CF in searches:
% rt list “queue = ‘pilot’ AND Status = ‘Resolved’” | wc -l
119
% rt list “queue = ‘pilot’ AND Status = ‘Resolved’ AND ‘CF.{Closed
Because}’ = ‘Done’” | wc -l
89
% rt list “queue = ‘pilot’ AND Status = ‘Resolved’ AND ‘CF.{Closed
Because}’ != ‘Done’” | wc -l
119

Here it looks like the “equals” test is working, but the unequal test is
not (it matches everything). The same is true for LIKE and NOT LIKE.
However, if I do similar tests with the “Won’t do” selections (using the
Web interface, because I did not manage to find the right syntax for
escaping the quote on the command line), the positive test also matches
other unintended “Won’t do” values…

Now I do suspect that this is a bug that may be triggered by the single
quotes in the value text, but I am not sure whether I can change the
value text of this CustomField without breaking all past tickets. I also
didn’t see anything that looks like a fix in the 3.4.5 update.

What can I do to make this work?

Rob Hooft

Rob W.W. Hooft || rob@hooft.net || http://www.hooft.net/people/rob/