[Rt-devel] FYI Search/Rights.html : The Refactoring!

Rolf Grossmann rg at progtech.net
Thu Nov 3 18:32:40 EST 2005


Hi,

Jesse Vincent wrote:

>>The first step is taking most of the code out of Build.html
>>and putting it in RT::Interface::Web::Buiuld.pm (where it
>>can be regression tested much easier). This also will
>>have the benefit that much of the search code duplicated in
>>Asset Tracker can be removed.
> 
> I'd _love_ that patch. Note also that much of that code is horrible,
> horrible duplicate code of code from the TicketSQL library that should
> be refactored back into that.

I've also been looking at that code a while ago (and I've sent a bug fix
for the search code to this list, but I guess it slipped through the
cracks ... ;)). I had to conclude, that those two copies, though quite
similar, are still working in different ways. While the Search code is
building a tree for the expression, the TicketSQL code is merely parsing
it for syntactic correctness while handing it off to the
DBIx::SearchBuilder module (and some undocumented part of it aswell, I
might add ;)). So I find refactoring that code is not as easy a task as
it looks.

Rolf.


More information about the Rt-devel mailing list