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.