[Koha-bugs] [Bug 21249] Syspref to choose whether to search homebranch, holding branch or both for library groups in advanced search

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sun Sep 16 02:58:17 CEST 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21249

--- Comment #4 from Alex Buckley <alexbuckley at catalyst.net.nz> ---
Created attachment 78921
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=78921&action=edit
Bug 21249 - New syspref controlling branch fields queried against selected
library group value in advanced search

This commit allows librarians to choose whether they want to query the
homebranch, holdingbranch or homebranch AND holdingbranch when they set
a library group search condition in the staff client and OPAC advanced
searches.

Test plan:
1. Apply patch and run ./updatedatabase.pl in the koha shell

2. Restart memcached and plack

3. In the staff client go to Administration->Global system preferences
and search for the systempreference: AdvancedSearchBranchFieldToUse and
notice by default it is set to 'homebranch and holdingbranch'

4. Create a library group (if you do not already have one) and add
several library branches to the group.

5. Note down the barcode of an item to use for testing searching. Make
sure the items homebranch and holdingbranch are different and the items
homebranch is a child branch of the library group created in step 4

5. Perform an Advanced search in the staff client and write in the
keyword as the barcode of the item and select the library group in the
'Location and availability' section.

6. Submit the search query and notice the item with a homebranch
existing in the selected library group is returned. This proves that
when the AdvancedSearchBranchFieldToUse syspref is set to 'homebranch and
holdingbranch' the homebranch value is checked.

Also note at the top of the search result page the search query is listed: 
Results of search
with limit(s): '(homebranch: <branch1> or holdingbranch: <branch2> or
homebranch:
<homebranch1> or holdingbranch: <branch2>)'

7. Now edit the item making sure the homebranch branch is not in the
library group, and making sure the holdingbranch is in the library
group. This is to test that holdingbranch is indeed being checked when
the AdvancedSearchBranchFieldToUse is set to
'AdvancedSearchBranchFieldToUse'.

8. Repeat step 5 and 6 and notice the item with a holdingbranch existing
in the selected library group is returned. This proves that when the
AdvancedSearchBranchFieldToUse syspref is set to 'homebranch and
holdingbranch' the holdingbranch is checked.

9. Change the value of the AdvancedSearchBranchFieldToUse syspref to
'holdingbranch' and repeat step 8 and again notice the item with a
holdingbranch existing in the selected library group is returned so we
know the holdingbranch is being chcked when the 'holdingbranch' value
for the syspref is set.

Also note the search query at the top of the page is: "Results of search
with limit(s): '(holdingbranch: <branch1> or holdingbranch: <branch2>)'"
this shows holdingbranch not homebranch is a condition in the query

10. Change the homebranch back to a branch that is in the library group
and change the holdingbranch value to a library branch that is not in
the library group.

11. Repeat step 5 and 6 and notice the item with the homebranch in the
selected library group is returned, so we know the homebranch is being
checked when the 'homebranch' value for the syspref is set.

Also note the search query at the top of the page is: " Results of
search  with limit(s): '(homebranch: <branch1> or homebranch: <branch2>)'" this
shows homebranch not holdingbranch is a condition in the query.

Sponsored-By: Brimbank Library

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list