Bug 11091: revamp search limit options for new subscription bib search form
authorFridolyn SOMERS <fridolyn.somers@biblibre.com>
Mon, 21 Oct 2013 09:54:16 +0000 (11:54 +0200)
committerGalen Charlton <gmc@esilibrary.com>
Thu, 5 Dec 2013 16:14:53 +0000 (16:14 +0000)
commite208386aaeaf31bd6f455077382ffd05b0b345b9
treec93df8cbac7b7962ec4b3560a73d4d5d0d2a3bfb
parent396bbc758756637782cd463a8586f2ac15757f4e
Bug 11091: revamp search limit options for new subscription bib search form

When creating a new subscription, you can click on "Search for Bilbio"
to search into catalog.

A popup opens with a text field for search terms and a combo-box to
limit search. This combo-box uses the syspref AdvancedSearchTypes to
know what list of values display.

The bug is that the code acts as if AdvancedSearchTypes has always one
value, but since Bug 7031, this syspref can have several values
(item types, collection codes and locations).

This patch removes the use of AdvancedSearchTypes syspref and defines
search form with 2 limits: item types and collection codes (from
authorised values CCODE).

One or both of this information can be on biblio. [RM note: this isn't a
true statement for the default configuration used by MARC21 libraries.]

Searching by location seems to be useless because this information is always
on item.  If CCODE authorised value does not exist or is empty, the collection
code filter is not displayed.

Test plan :
- Check CCODE authorised value exists with some values
- Choose a biblio indexed with both itemtype and ccode indexes
- Go to Serials module and click on "New subscription"
- In form, click on "Search for Biblio"
=> The popup "serials/subscription-bib-search.pl" appears with two limits
- Enter a word of biblio title, select its item type and select its collection code
- Click on "Search"
=> You get the biblio

Signed-off-by: David Noe <drnoe@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
While I am not sure how useful the collection code is for most libraries, where this
is an item level value, this fixes a broken feature and works as described.
Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-bib-search.tt
serials/subscription-bib-search.pl