Adding a "predefined search" field

There’s a particular search we do constantly against our custom field “PO Number”. Since the custom field is only applied to certain queues, building the search is a two-step process of first adding the “Queue is XYZ” search term which then gives us visibility to add the PO Number search term.

It’s not uncommon to need to do 20 or 30 such searches in rapid succession. This gets tedious because you have to Edit Search, delete the old value, add the new value, and repeat 30 times.

What I’d really like is a search field in the upper bar (separate from the existing one) which automatically does a “search queue XYZ for tickets with PO Number value of ” search. That would avoid all of these tedious steps.

What’s the best way to go about adding such functionality to our RT 3.8 interface?

Fran Fabrizio
Director of Information Systems
UAB College of Arts and Sciences
Error 404 | Not Found | 205.996.5698 | fabrizio@uab.edumailto:fabrizio@uab.edu

hi,

you could easily have an external page (or a modified portion of a RT
page) with a prebuilt http adress corresponding to the query you want (or
a saved search maybe?)
here is an exemple of how a search looks like when you create it through
the RT Query builder, look for the HERE_IS_YOUR_xxxx and put what you want
in it.

http://yourRTadress/Search/Edit.htm
l?Format=‘%20%20%20%3Cb%3E%3Ca%20href%3D%22__WebPath__%2FTicket%2FDisplay.html%3Fid%3D__id__%22%3E__id__%3C%2Fa%3E%3C%2Fb%3E%2FTITLE%3A%23’%2C%0A’%3Cb%3E%3Ca%20href%3D%22__WebPath__%2FTicket%2FDisplay.html%3Fid%3D__id__%22%3E__Subject__%3C%2Fa%3E%3C%2Fb%3E%2FTITLE%3ASubject’%2C%0A’Status’%2C%0A’QueueName’%2C%0A’OwnerName’%2C%0A’Priority’%2C%0A’NEWLINE’%2C%0A’‘%2C%0A’%3Csmall%3E__Requestors__%3C%2Fsmall%3E’%2C%0A’%3Csmall%3E__CreatedRelative__%3C%2Fsmall%3E’%2C%0A’%3Csmall%3E__ToldRelative__%3C%2Fsmall%3E’%2C%0A’%3Csmall%3E__LastUpdatedRelative__%3C%2Fsmall%3E’%2C%0A’%3Csmall%3E__TimeLeft__%3C%2Fsmall%3E’&Order=ASC%7CASC%7CASC%7CASC&OrderBy=Priority%7C%7C%7C&Page=1&Query=Queue%20%3D%20’
HERE_IS_YOUR_QUEUE_NAME’%20AND%20’CF.%7BHERE_IS_THE_CUSTOM_FIELD_NAME
%7D’%20LIKE%20’HERE_IS_YOUR_SEARCH_FIELD
'&RowsPerPage=50&SavedChartSearchId=new&SavedSearchId=

hope it helps

Raphaël

Francis L Fabrizio fabrizio@uab.edu
Envoyé par : rt-users-bounces@lists.bestpractical.com
20/05/2011 16:28

A
rt-users@lists.bestpractical.comrt-users@lists.bestpractical.com
cc

Objet
[rt-users] Adding a “predefined search” field

There’s a particular search we do constantly against our custom field “PO
Number”. Since the custom field is only applied to certain queues,
building the search is a two-step process of first adding the “Queue is
XYZ” search term which then gives us visibility to add the PO Number
search term.

It’s not uncommon to need to do 20 or 30 such searches in rapid
succession. This gets tedious because you have to Edit Search, delete the
old value, add the new value, and repeat 30 times.

What I’d really like is a search field in the upper bar (separate from the
existing one) which automatically does a “search queue XYZ for tickets
with PO Number value of ” search. That
would avoid all of these tedious steps.

What’s the best way to go about adding such functionality to our RT 3.8
interface?

Fran Fabrizio
Director of Information Systems
UAB College of Arts and Sciences

HHB510E | 205.996.5698 | fabrizio@uab.edu

" Ce courriel et les documents qui lui sont joints peuvent contenir des
informations confidentielles ou ayant un caract�re priv�. S’ils ne vous sont
pas destin�s, nous vous signalons qu’il est strictement interdit de les
divulguer, de les reproduire ou d’en utiliser de quelque mani�re que ce
soit le contenu. Si ce message vous a �t� transmis par erreur, merci d’en
informer l’exp�diteur et de supprimer imm�diatement de votre syst�me
informatique ce courriel ainsi que tous les documents qui y sont attach�s."

" This e-mail and any attached documents may contain confidential or
proprietary information. If you are not the intended recipient, you are
notified that any dissemination, copying of this e-mail and any attachments
thereto or use of their contents by any means whatsoever is strictly
prohibited. If you have received this e-mail in error, please advise the
sender immediately and delete this e-mail and all attached documents
from your computer system."

There’s a particular search we do constantly against our custom field “PO
Number”. Since the custom field is only applied to certain queues, building
the search is a two-step process of first adding the “Queue is XYZ” search
term which then gives us visibility to add the PO Number search term.

It’s not uncommon to need to do 20 or 30 such searches in rapid succession.
This gets tedious because you have to Edit Search, delete the old value, add
the new value, and repeat 30 times.

What I’d really like is a search field in the upper bar (separate from the
existing one) which automatically does a “search queue XYZ for tickets with
PO Number value of ” search. That would
avoid all of these tedious steps.

What’s the best way to go about adding such functionality to our RT 3.8
interface?

One way:
http://requesttracker.wikia.com/wiki/SearchCustomField

This solution shows how to enable the following syntax in the search input box:

cf.xxx:value

You just should adjust it a little and your users can type:

po:123

and perform the search.

Fran Fabrizio

Director of Information Systems

UAB College of Arts and Sciences

http://www.uab.edu/cas/

HHB510E | 205.996.5698 | fabrizio@uab.edu

Best regards, Ruslan.

You can also edit the query in the Advanced tab (it’s fairly simple
syntax) and that way you don’t need so many clicks.

Thomas

I just installed RTx::Tags to get the enhanced simple search custom field functionality without having to patch code. Thanks for the suggestion!

Works great except RTx::Tags seems to have broken my layout in the upper right of the page. See the attached image - the New Ticket queue dropdown got moved under the Search button for some reason. (This is RT 3.8.8 / Firefox 3.6.17 / 64-bit Win7.)

I just installed RTx::Tags to get the enhanced simple search custom field functionality without having to patch code. Thanks for the suggestion!

Works great except RTx::Tags seems to have broken my layout in the upper right of the page. See the attached image - the New Ticket queue dropdown got moved under the Search button for some reason. (This is RT 3.8.8 / Firefox 3.6.17 / 64-bit Win7.)

RTx-Tags is a 3rd party extension, so you may need to report the bug
to the rt.cpan queue if the author doesn’t reply on-list.

https://rt.cpan.org/Public/Dist/Display.html?Queue=RTx-Tags

-kevin

Hi

I use the “smart keywords” feature of firefox
http://support.mozilla.com/en-US/kb/Smart%20keywordswhich allows me to
type “rtcompany yoyodine” in the LOcation bar of firefox
and returns me the result of a search on a Custom Field

* Go to "Organize bookmarks" ("Show all bookmarks" in FF4)
* In the right-button menu, click on "New bookmark"
* In the dialog box, add the following
      o Name: Search RT Company
      o Location:
        https://rt/Search/Results.html?Order=ASC&OrderBy=id&Query=(Status%3D'new'OR%20Status%3D'open')AND%20'CF.%7BCompany%7D'%20LIKE%20'%s'
      o Keyword: rtcompany

The important part is the ‘%s’ at the end of the location. Firefox will
replace it with what you type after the keyword.

The location URL can be much complicated than the above. You can also
add the Format (ie the Columns displayed).
I usually build a search using the Search builder and copy/paste the URL.
As far as I know, the “smart keywords” allows you only one variable (%s)

GerardOn 2011-05-20 16:22, Francis L Fabrizio wrote:

There�s a particular search we do constantly against our custom field
�PO Number�. Since the custom field is only applied to certain queues,
building the search is a two-step process of first adding the �Queue
is XYZ� search term which then gives us visibility to add the PO
Number search term.

It�s not uncommon to need to do 20 or 30 such searches in rapid
succession. This gets tedious because you have to Edit Search, delete
the old value, add the new value, and repeat 30 times.

What I�d really like is a search field in the upper bar (separate from
the existing one) which automatically does a �search queue XYZ for
tickets with PO Number value of �
search. That would avoid all of these tedious steps.

What�s the best way to go about adding such functionality to our RT
3.8 interface?

Fran Fabrizio

Director of Information Systems

UAB College of Arts and Sciences

http://www.uab.edu/cas/ http://www.uab..edu/cas/

HHB510E | 205.996.5698 | fabrizio@uab.edu mailto:fabrizio@uab.edu