Bug 22595: Items search is mixing inputs
authorFridolin Somers <fridolin.somers@biblibre.com>
Wed, 27 Mar 2019 15:19:29 +0000 (16:19 +0100)
committerNick Clemens <nick@bywatersolutions.com>
Thu, 11 Apr 2019 11:36:10 +0000 (11:36 +0000)
commit3e9989568e171ebcfc73df80c49556e0b663a8ae
treed95a16f964bebc99be502a09b4bbaca779027dd8
parent679fdaebb1a611859a968f22b85c37fbc00b055b
Bug 22595: Items search is mixing inputs

Items search is using inputs and selects from search form to create an Ajax call.

In this call selects are parsed before inputs.
But a custom search field can be used with authorised values and used after a regular search field.
In this case the "q" param is not ordered like the "name" param.

Test plan :
1) Go to Administration > Item search fields
2) Define a search field with an authorised values category
3) Go to items search
4) Use a regular filter like call number
5) Click on new field
6) Use custom field with an authorised value
7) Perform search
=> Without patch you get wrong resuts, authorised value is used as value for first field
=> You can see this by listening traffic in Firebug, look at params "f" and "q"
8) Check some combinaison of select and input filters

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt