[rt-users] Searching custom field from homepage

Jason Edwards platitudezinc at gmail.com
Wed Dec 14 16:31:20 EST 2005


Below is the quick solution I wrote this afternoon:

1. Created a file named UsernameSearch in local/html/Elements containing:

<& /Elements/TitleBoxStart, title => loc('Search username') &>
<form method="post" action="<%$RT::WebPath%>/index.html">
<input type="hidden" name="SearchUsername" value="1">
<table>
<tr>
<td>
<font size="-2"><&|/l&>Username</&>:<br><input size="25" name="username"></font>
</td>
<td>
<font size="-2"><&|/l&>Queue</&>:<br><& /Elements/SelectQueue, Name =>
'Queue', ShowNullOption => 0 &></font>
</td>
<td>
<div align="right" halign="bottom"><input type="submit"
value="<%loc('Search')%>"></div>
</td>
</tr>
</table>
</form>
<& /Elements/TitleBoxEnd &>

2. Added this to local/html/index.html:

<& /Elements/UsernameSearch &>

AND:

if ($ARGS{'SearchUsername'} ) {
    my $query = "Queue = '$ARGS{'Queue'}' AND CF.Username LIKE
'$ARGS{'username'}'";
     #print $query;

    $m->comp("/Search/Results.html", Query => $query);
    return();
}

Quick and dirty but it works....

-Jason






On 12/14/05, Todd Chapman <todd at chaka.net> wrote:
> On Wed, Dec 14, 2005 at 02:36:46PM -0500, Jason Edwards wrote:
> > Kenn,
> >
> > Thanks for the reply. I'm ok with searching the way you stated below,
> > however my bosses aren't. They would like it to be as user friendly and
> > intuitive as possible. And I admit, that for some the interface may seem a
> > little cluttered and non intuitive at times (especially the query page).
> > They think our support staff will kinda freak out when they see the query
> > builder and not know how to use it. So I've been tasked with creating a more
> > friendly interface for RT.
> >
> > Basically what they want is an element on the homepage (like the Quick
> > create element) that allows them to search for the Username in a queue. I
> > was hoping someone had created something like this before to save me some
> > time (I've got a ton on my plate now :) )
> >
> > I would love to use RT as it is, but my bosses believe the UI is overly
> > complicated.......
>
> I think Jesse would agree with you. Be a hero; get your company to
> support RT by contracting with Best Practical to create a simpler
> search interface!
>
> > -Jason
>



More information about the rt-users mailing list