[Rt-devel] Ticket Collection via List of Ticket IDs

Kevin Falcone falcone at bestpractical.com
Wed Sep 9 12:34:30 EDT 2009


On Wed, Sep 09, 2009 at 12:02:09PM -0400, Jerrad Pierce wrote:
> > If only TicketSQL/DIBx::SearchBuilder supported IN(): id IN(37,42,86)
> I actually took a stab at implementing this last night, and it's no mean feat
> since you have to severly alter the parsing engine in RT::SQL (and
> make some minor changes to RT::Tickets_Overlay).
> 
> Although not as elegant, nor as efficient for the db, I'm considering
> creating an extension that uses an callback to turn the IN syntax into
> an expanded OR alternation if nobody comes up with anything better.
> Alas, that'd only change simple search/query string processing, and not
> Ticket Builder/ Advanced Edit, which is where I most often need IN() myself...
> 
> ... Queue NOT IN ('Spool', 'SPAM', 'TODO')
> 
> I'll try to checkout the Jifty::DBI patch too, to see if it does enough of
> the heavy-lifting.

The JDBI patch only implements it at the JDBI level.
As you've noted, the actual complexity is in the TicketSQL parser
Frankly I just write the map/join when I need an alternating condition

-kevin


More information about the Rt-devel mailing list