[rt-devel] Local changes to help ticket searching

Jim Berry jim.h.berry at frb.gov
Mon Feb 4 17:35:55 EST 2013


Greetings,

Here is a summary of some of the changes we've made to help users search tickets.  If there is interest, I can submit feature requests or provide more details.  (See also another approach  at http://requesttracker.wikia.com/wiki/Full_Text_Search_Portlet )

We index our database and normally want to do a Content Search.   One of our managers wanted to type "cats OR dogs" in the "Search..." box and get a list all tickets with either cats or dogs in the content.  And he wanted each occurrence to be highlighted when a ticket is displayed.  And he didn't want to use the full Search/Build.html interface unless absolutely necessary.   So I tinkered a bit.

1. When viewing a listing of tickets from Search/Results.html, we show the query just above the list of tickets (similar to what is seen below a chart from Search/Chart.html).  This is very useful when following a link from a dashboard or RT at a Glance when it might not be obvious exactly what was searched.  Best Practical added more callbacks in Results.html (after v4.0.8), and we print the query from a callback.  It might be nice to have a user option to display the query directly from Results.html.  This might require some CSS adjustment for it to look reasonable in all browsers, especially if the query is long.

2. When doing a Content Search, we highlight the matching text when the ticket is displayed.  This required adding a few lines in Ticket/Elements/ShowMessageStanza to wrap a <span> around the match and creating a CSS entry with a yellow background.  No doubt I am doing this in a very inefficient and inelegant way, but this does not seem to slow down the ticket display.

3. I wrote a modified version of Search/Simple.html.  This is used as the action when one uses the "Search..." box, or if one chooses Simple Search from the menu. I did not want to touch RT::Search::Googleish, so there are some very ugly hacks to manipulate the query string before and after calling Googleish for some of the effects.  Very ugly, and a bit specific for our site. Key features:

a) Content Search (instead of Subject) is on by default. [perhaps RT should do this in Build.html and Simple.html whenever the database is indexed].

b) AND, OR, and Parentheses can be used between search terms. AND is assumed.

c) Our users were not happy with the page displayed by the original Simple.html nor with the complexity of the full Search/Build.html.  So as a compromise, I added a few arbitrary items:
   a drop down box to pick a queue;
   check boxes to choose inactive/active status;
   a text box with autocompletion to pick a requestor's email;
   check boxes to choose to search on Subject or Content.
Regards,
Jim Berry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-devel/attachments/20130204/662ef329/attachment.html>


More information about the rt-devel mailing list