https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21249
--- Comment #14 from [email protected] <[email protected]> --- Created attachment 93345 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93345&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. Create a subgroup from the library group and add several library branches to the sub 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 of the sub group created in step 4 6. Perform an Advanced search in the staff client and write in the item barcode as the keyword and select the sub group in the 'Location and availability' section. 7. Submit the search query and notice the item with a homebranch existing in the selected sub 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>)' 8. Now edit the item making sure the homebranch branch is not in the sub group, and making sure the holdingbranch is in the sub group. This is to test that holdingbranch is indeed being checked when the AdvancedSearchBranchFieldToUse is set to 'homebranch and holdingbranch' 9. Repeat step 6 and notice the item with a holdingbranch existing in the selected library group is returned. 10. Change the value of the AdvancedSearchBranchFieldToUse syspref to 'holdingbranch' and repeat step 6 and again notice the item with a holdingbranch existing in the selected library group is returned. 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 11. Change the value of the AdvancedSearchBranchFieldToUse syspref to 'homebranch' 12. Change the item homebranch back to a branch that is in the sub group and change the holdingbranch value to a library branch that is not in the sub group. 13. Repeat step 6 and notice the item with the homebranch in the selected library group is returned, so we know the homebranch is being checked. 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 Signed-off-by: Amandine Zocca <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
