Search in Querystring

English! place to talk about development, programming and coding
Post Reply
RBehr
Znuny expert
Posts: 167
Joined: 26 Jan 2011, 13:23
Znuny Version: 3.0.7
Real Name: Rod Behr
Company: Impact
Location: London, United Kingdom
Contact:

Search in Querystring

Post by RBehr »

Is it possible to set up a URL to a search results list, perhaps by providing a querystring?
Rod Behr
Software Design Manager and Database Analyst | Impact Audiovisual | London
Installation: OTRS 3.0.7, Apache 2, Strawberry Perl 5 on Ubuntu 10.04.3 Server with separate MySQL Server, also on Ubuntu 10.04.3
martini
Moderator
Posts: 12
Joined: 13 Oct 2008, 20:43
Znuny Version: 3.x.x
Real Name: Martin Edenhofer
Company: Znuny GmbH
Contact:

Re: Search in Querystring

Post by martini »

Can you describe "URL to a search results list" a little bit more? Your use case would be great!

Thanks a lot!

-Martin
Privat: http://edenhofer.de - Passion: http://otterhub.org - OTRS Services: http://znuny.com
RBehr
Znuny expert
Posts: 167
Joined: 26 Jan 2011, 13:23
Znuny Version: 3.0.7
Real Name: Rod Behr
Company: Impact
Location: London, United Kingdom
Contact:

Re: Search in Querystring

Post by RBehr »

I have users for whom the search functionality and use of search templates is too complex. For the record, I think it's brilliant, but these are "users", in the worst possible sense. In fairness, we are searching a CI database of over 10,000 assets, a customer database of over 1,000 customers and a swiftly growing database of tickets.

So I want to set up links direct to search results. I was hoping for something along the lines of:

Code: Select all

/indexl.pl?search;type=ConfigItem;field1=*string1*;field2=*string2*
I know this approach is very limiting, but my users are insisting on it. Perhaps a better idea might be to base the URL on a template:

Code: Select all

/index.pl?search;type=Ticket;template=mytemplate
We can then manage templates as things change, rather than having to recode querystrings.

The URL must not go to the search form, even if that form is pre-filled with the correct values. It needs to go directly to the search results list.

Any help most appreciated. I'd work from the results as they appear on the site, however, after entering search criteria and clicking "Search", the URL as displayed is simply to index.pl with no querystring, doubtless because you're using form values and not querystring values.
Rod Behr
Software Design Manager and Database Analyst | Impact Audiovisual | London
Installation: OTRS 3.0.7, Apache 2, Strawberry Perl 5 on Ubuntu 10.04.3 Server with separate MySQL Server, also on Ubuntu 10.04.3
Post Reply