[rt-users] RT3 - Custom Field search box in at a glance

Stijn Jonker sjcjonker at sjc.nl
Thu Jul 28 02:07:31 EDT 2011


Ruslan & Others,

On 27 Jul 2011, at 18:07, Ruslan Zakirov wrote:

> Take a look into index.html where that input box is processed
> initially. There is a callback to analyze string and implement custom
> action.

I did but, whatever I tried no success; I don't want to scream bug, but maybe call this an undocumented feature.. The issue is that I already modified the Googlish.pm module to add to the section:

    for my $key (@keywords) {

        # Is this a ticket number? If so, go to it.
        # But look into subject as well
        if ( $key =~ m/^\d+$/ ) {
            push @id_clauses, "id = '$key'", "Subject LIKE '$key'", "CF.{ExtTicketId} LIKE '$key'";
        }

the "CF.{ExtTicketId} LIKE '$key'" item, but whatever I did when entering a numeric item it never found anything. Then I found in "Simple.html" the section:

#    if ($q =~ /^#?(\d+)$/) {
#        RT::Interface::Web::Redirect(RT->Config->Get('WebURL')."Ticket/Display.html?id=".$1);
#    }

So any search item entered which solely consists of digits is never searched for but always forces a ticket lookup, this without any fallback to the Googlish search. This also means the code in Googlish.pm is never executed.

But correct me if I'm wrong or it's called from other locations where this is taken into account.

> Want to note that RT4 has better abstraction of simple search and it's
> easier to implement a new syntax there.

I'm aware; however there is no port yet; and rather stay away from x.0 releases out of experience.

> On Wed, Jul 27, 2011 at 8:41 AM, Stijn Jonker <sjcjonker at sjc.nl> wrote:
>> Hi All,
>> 
>> Within our relatively new instance of RT 3.8.10 an custom field is created for the external ticket / reference number. Despite searches, possibly with wrong words, on RT-Users and the Wiki the following question still remains:
>> 
>> The normal search box above doesn't return any matches on the "Ext Ticket #" custom field despite being a global custom field. When performing an query via the query builder searches for a ext ticket number, for instance 11111 works fine and the internal ticket 1030 is returned. When there we have an internal ticket which has the same ID as stored in an other ticket for the ext ticket # then the internal ticket is shown directly.
>> 
>> What we would like to do is present an special search box on the "RT at a glance" page where the search is solely performed on the custom field. Is there any way to do this with the base functions of RT or via an extension?
>> 
>> If this is not available, are there some pointers available how one can create, via a bit a perl or so, an item on the "RT at a glance" page with this search form that will populate a field in a saved search or otherwise?
>> 
>> Thanks in advance,
>> Stijn

--
Yours Sincerly / Met Vriendelijke groet,
Stijn Jonker






More information about the rt-users mailing list