Description
Kyle M Hall
2013-05-17 15:07:53 UTC
Created attachment 18207 [details] [review] Bug 10278 - Add ability to hide items and records from search results for Independent Branches For the staff intranet, enabling IndependentBranchesRecordsAndItems will automatically add a branch limit filter to the search results thus hiding all records without one or more items owned by the logged in library. In add addition, all items whose homebranch is not that libraries will be filtered and hidden from the search results and record details. This system preference will not affect the OPAC, unless the environment variable BRANCHCODE is defined in the koha-httpd.conf file. If it is defined, the same filters are applied to the OPAC, but based on the branchcode value of the environment variable BRANCHCODE, rather than the logged in branch. Test Plan: 1) Apply patch 2) Run updatedatabase.pl 3) Perform a search that will give results for both records which have items owned by the logged in library, and records which have no items owned by the logged in library. 4) Enable the new system preference IndependentBranchesRecordesAndItems 5) Perform the same search again, any records without items owned by the currently logged in library should not appear. Created attachment 18420 [details] [review] Bug 10278 - Add ability to hide items and records from search results for Independent Branches For the staff intranet, enabling IndependentBranchesRecordsAndItems will automatically add a branch limit filter to the search results thus hiding all records without one or more items owned by the logged in library. In add addition, all items whose homebranch is not that libraries will be filtered and hidden from the search results and record details. This system preference will not affect the OPAC, unless the environment variable BRANCHCODE is defined in the koha-httpd.conf file. If it is defined, the same filters are applied to the OPAC, but based on the branchcode value of the environment variable BRANCHCODE, rather than the logged in branch. Test Plan: 1) Apply patch 2) Run updatedatabase.pl 3) Perform a search that will give results for both records which have items owned by the logged in library, and records which have no items owned by the logged in library. 4) Enable the new system preference IndependentBranchesRecordesAndItems 5) Perform the same search again, any records without items owned by the currently logged in library should not appear. Created attachment 18520 [details] [review] Bug 10278 - Add ability to hide items and records from search results for Independent Branches For the staff intranet, enabling IndependentBranchesRecordsAndItems will automatically add a branch limit filter to the search results thus hiding all records without one or more items owned by the logged in library. In add addition, all items whose homebranch is not that libraries will be filtered and hidden from the search results and record details. This system preference will not affect the OPAC, unless the environment variable BRANCHCODE is defined in the koha-httpd.conf file. If it is defined, the same filters are applied to the OPAC, but based on the branchcode value of the environment variable BRANCHCODE, rather than the logged in branch. Test Plan: 1) Apply patch 2) Run updatedatabase.pl 3) Perform a search that will give results for both records which have items owned by the logged in library, and records which have no items owned by the logged in library. 4) Enable the new system preference IndependentBranchesRecordesAndItems 5) Perform the same search again, any records without items owned by the currently logged in library should not appear. Created attachment 18715 [details] [review] Bug 10278 - Add ability to hide items and records from search results for Independent Branches For the staff intranet, enabling IndependentBranchesRecordsAndItems will automatically add a branch limit filter to the search results thus hiding all records without one or more items owned by the logged in library. In add addition, all items whose homebranch is not that libraries will be filtered and hidden from the search results and record details. This system preference will not affect the OPAC, unless the environment variable BRANCHCODE is defined in the koha-httpd.conf file. If it is defined, the same filters are applied to the OPAC, but based on the branchcode value of the environment variable BRANCHCODE, rather than the logged in branch. Test Plan: 1) Apply patch 2) Run updatedatabase.pl 3) Perform a search that will give results for both records which have items owned by the logged in library, and records which have no items owned by the logged in library. 4) Enable the new system preference IndependentBranchesRecordesAndItems 5) Perform the same search again, any records without items owned by the currently logged in library should not appear. Created attachment 20774 [details] [review] Bug 10278 - Add ability to hide items and records from search results for Independent Branches For the staff intranet, enabling IndependentBranchesRecordsAndItems will automatically add a branch limit filter to the search results thus hiding all records without one or more items owned by the logged in library. In add addition, all items whose homebranch is not that libraries will be filtered and hidden from the search results and record details. This system preference will not affect the OPAC, unless the environment variable BRANCHCODE is defined in the koha-httpd.conf file. If it is defined, the same filters are applied to the OPAC, but based on the branchcode value of the environment variable BRANCHCODE, rather than the logged in branch. Test Plan: 1) Apply patch 2) Run updatedatabase.pl 3) Perform a search that will give results for both records which have items owned by the logged in library, and records which have no items owned by the logged in library. 4) Enable the new system preference IndependentBranchesRecordesAndItems 5) Perform the same search again, any records without items owned by the currently logged in library should not appear. Created attachment 21146 [details] [review] Bug 10278 - Add ability to hide items and records from search results for Independent Branches For the staff intranet, enabling IndependentBranchesRecordsAndItems will automatically add a branch limit filter to the search results thus hiding all records without one or more items owned by the logged in library. In add addition, all items whose homebranch is not that libraries will be filtered and hidden from the search results and record details. This system preference will not affect the OPAC, unless the environment variable BRANCHCODE is defined in the koha-httpd.conf file. If it is defined, the same filters are applied to the OPAC, but based on the branchcode value of the environment variable BRANCHCODE, rather than the logged in branch. Test Plan: 1) Apply patch 2) Run updatedatabase.pl 3) Perform a search that will give results for both records which have items owned by the logged in library, and records which have no items owned by the logged in library. 4) Enable the new system preference IndependentBranchesRecordesAndItems 5) Perform the same search again, any records without items owned by the currently logged in library should not appear. Applying: Bug 10278 - Add ability to hide items and records from search results for Independent Branches Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. Patch failed at 0001 Bug 10278 - Add ability to hide items and records from search results for Independent Branches The copy of the patch that failed is found in: /home/christopher/git/koha/.git/rebase-apply/patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". Created attachment 23490 [details] [review] Bug 10278 - Add ability to hide items and records from search results for Independent Branches For the staff intranet, enabling IndependentBranchesRecordsAndItems will automatically add a branch limit filter to the search results thus hiding all records without one or more items owned by the logged in library. In add addition, all items whose homebranch is not that libraries will be filtered and hidden from the search results and record details. This system preference will not affect the OPAC, unless the environment variable BRANCHCODE is defined in the koha-httpd.conf file. If it is defined, the same filters are applied to the OPAC, but based on the branchcode value of the environment variable BRANCHCODE, rather than the logged in branch. Test Plan: 1) Apply patch 2) Run updatedatabase.pl 3) Perform a search that will give results for both records which have items owned by the logged in library, and records which have no items owned by the logged in library. 4) Enable the new system preference IndependentBranchesRecordesAndItems 5) Perform the same search again, any records without items owned by the currently logged in library should not appear. I tested this and want to sign off on it. Joel Sasse Created attachment 23638 [details] [review] Bug 10278 - Add ability to hide items and records from search results for Independent Branches Comment on attachment 23638 [details] [review] Bug 10278 - Add ability to hide items and records from search results for Independent Branches Review of attachment 23638 [details] [review]: ----------------------------------------------------------------- Can't apply this patch, as the dependency doesn't apply, but starting with a code review: 1) We need some unit tests for the new routine GetCategoriesForBranch (UT). Also regression tests, additional tests, any tests for some of the other routines would be nice. Failed QA for the missing unit tests. ::: C4/Branch.pm @@ +42,4 @@ > &GetCategoryTypes > &GetBranchCategories > &GetBranchesInCategory > + &GetCategoriesForBranch UT ::: koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref @@ +75,5 @@ > + default: 0 > + choices: > + yes: Prevent > + no: "Don't prevent" > + - staff from seeing items owned by other libraries, and records without any items the library. I think there is a word missing in the last bit. I wonder a bit about the consequences - it will be required to always add at least one 'fake' item to every record, that you want to show up in the OPAC. Thinking about serials and electronic resources, but also set and traced serial record as used in Germany. ::: koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt @@ +32,2 @@ > strQuery += "&" + "[% z3950_search_param.name %]" + "=" + "[% z3950_search_param.encvalue %]"; > +*/ Why are you commenting this bit out? Created attachment 36033 [details] [review] Bug 10278 - Add ability to hide items and records from search results for Independent Branches For the staff intranet, enabling IndependentBranchesRecordsAndItems will automatically add a branch limit filter to the search results thus hiding all records without one or more items owned by the logged in library. In add addition, all items whose homebranch is not that libraries will be filtered and hidden from the search results and record details. This system preference will not affect the OPAC, unless the environment variable BRANCHCODE is defined in the koha-httpd.conf file. If it is defined, the same filters are applied to the OPAC, but based on the branchcode value of the environment variable BRANCHCODE, rather than the logged in branch. Test Plan: 1) Apply patch 2) Run updatedatabase.pl 3) Perform a search that will give results for both records which have items owned by the logged in library, and records which have no items owned by the logged in library. 4) Enable the new system preference IndependentBranchesRecordesAndItems 5) Perform the same search again, any records without items owned by the currently logged in library should not appear. Signed-off-by: Joel Sasse <jsasse@plumcreeklibrary.net> |