Keyword Search Criteria & DBIx::SearchBuilder

I was trying to produce a list of all blue tickets and all green
tickets[*0]. So I tried refining the search with a ‘colour is blue’
keyword selection. That’s fine, I got all blue tickets.

Then I tried a further refinement of ‘colour is green’. I got no
tickets at all – presumably because none of the tickets are both blue
and green. (‘colour’ is a single- rather than multi-keyword select.)

That’s reasonable, since in general each individual criterion should
match for the criteria as a whole to match. (And for multi-keyword
selects it’s sensible behaviour.) But only one Status need match: a
search with ‘Status is open’ and ‘Status is new’ returns all the tickets
that are open and all the tickets that are new, not all the tickets that
are both open and new.

So I thought I’d have a hunt around to see if I could get keyword
selects to behave like statuses. I found RT::Tickets and the
_ProcessRestrictions() function, and the elsif block testing for
‘KEYWORDFIELD’. In a couple of calls to SUPER::Limit() I tried




but this doesn’t help with what I was trying to do (and it presumably
breaks something else, so I changed it back).

I’ve never delved into DBIx::SearchBuilder before. Can somebody give me
a clue as to where I should be looking to make keyword select criteria
be or-ed rather than and-ed together?



[*0] Some keywords’ names have been changed to protect the guilty.