* Hide from the staff client search results any records that do not have an item owned by the library of the logged in user, controlled by the system preference IndependentBranchesIntranetSearch. Note, this will not hide any items from other libraries, it will just filter out any records that are not "relevant" to the logged in library. * Hide from the OPAC search results any records that do not have an item owned by the library defined in the environment variable BRANCHCODE defined in the VirtualHost configuration for a given OPAC. * Prevent any library from editing a MARC record unless that user's branchcode matches the branchcode in the MARC subfield which is defined as the owning branch of that MARC record (951$o).
Created attachment 17960 [details] [review] Bug 10200 - Add more Independent Branches options - Part 1 - IndependentBranchesIntranetSearch Enabling IndependentBranchesIntranetSearch 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, including records with no items attached. 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 IndependentBranchesIntranetSearch 5) Perform the same search again, any records without items owned by the currently logged in library should not appear.
Created attachment 17961 [details] [review] Bug 10200 - Add more Independent Branches options - Part 1 - IndependentBranchesIntranetSearch Enabling IndependentBranchesIntranetSearch 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, including records with no items attached. 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 IndependentBranchesIntranetSearch 5) Perform the same search again, any records without items owned by the currently logged in library should not appear.
Created attachment 17963 [details] [review] Bug 10200 - Add more Independent Branches options - Part 2 - IndependentBranchesOpacSearch Enabling IndependentBranchesIntranetSearch will automatically add a branch limit filter to the search results thus hiding all records without one of more items owned by the library as defined by the webserver environment variable BRANCHCODE for the given OPAC, including records with no items attach. Test Plan: 1) Apply the patch 2) Run updatedatabase.pl 3) Add this line to the http-conf for your OPAC: SetEnv BRANCHCODE "MPL" Replace MPL with the branchcode you want to use for this test 4) Perform a search that will give results for both records which have items owned by the set library, and records which have no items owned by the set library. 5) Enable the new system preference IndependentBranchesOpacSearch 6) Perform the same search again, any records without items owned by the library set in the BRANCHCODE environment variable should not appear.
Created attachment 17981 [details] [review] Bug 10200 - Add more Independent Branches options - Part 1 - IndependentBranchesIntranetSearch Enabling IndependentBranchesIntranetSearch 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, including records with no items attached. 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 IndependentBranchesIntranetSearch 5) Perform the same search again, any records without items owned by the currently logged in library should not appear.
Created attachment 17982 [details] [review] Bug 10200 - Add more Independent Branches options - Part 3 - IndependentBranchesMarcEditing Adds a new system preference IndependentBranchesMarcEditing. If this new syspref is enabled, a librarian can only edit or delete a bib record if his or her logged in branch code matches the branchcode in biblio.branchcode. This feature does not affect the ability to edit or delete items, as that functionality is determined by IndependantBranches. Test Plan: 1) Apply patch 2) Run updatedatabase.pl 3) Map a nonrepeatable field/subfield to biblio.branchcode Pro-tip: Use the authorised value 'branches' to get a pulldown of libraries instead of entering the branchcode manually. 4) Edit a record, and add a branchcode. 5) Log in as a non-superlibrarian with cataloging priveleges 6) Change the logged in branch to a branch other than the one you entered in the record. 7) You should note the 'edit' pulldown for the record is missing the "Edit record" and "Delete record" options. 8) Switch the logged in branch to match the branchcode of the record. 9) You should now see the edit and delete options for that record. 10) Attempt to edit a record with no branchcode defined, you should be able to.
Created attachment 17983 [details] [review] Bug 10200 - Add more Independent Branches options - Part 4 - Add branches_optional for MARC field authorised values This patch adds the branches_optional field to the authorised values pulldown for MARC fields and subfields in the MARC frameworks editor. 'branches_optional' behaves exactly like 'branches' except it includes an "empty" choice so the branch does not have to be set.
Created attachment 17984 [details] [review] Bug 10200 - Add more Independent Branches options - Part 1 - IndependentBranchesIntranetSearch Enabling IndependentBranchesIntranetSearch 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, including records with no items attached. 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 IndependentBranchesIntranetSearch 5) Perform the same search again, any records without items owned by the currently logged in library should not appear.
Created attachment 17985 [details] [review] Bug 10200 - Add more Independent Branches options - Part 2 - IndependentBranchesOpacSearch Enabling IndependentBranchesIntranetSearch will automatically add a branch limit filter to the search results thus hiding all records without one of more items owned by the library as defined by the webserver environment variable BRANCHCODE for the given OPAC, including records with no items attach. Test Plan: 1) Apply the patch 2) Run updatedatabase.pl 3) Add this line to the http-conf for your OPAC: SetEnv BRANCHCODE "MPL" Replace MPL with the branchcode you want to use for this test 4) Perform a search that will give results for both records which have items owned by the set library, and records which have no items owned by the set library. 5) Enable the new system preference IndependentBranchesOpacSearch 6) Perform the same search again, any records without items owned by the library set in the BRANCHCODE environment variable should not appear.
Created attachment 17986 [details] [review] Bug 10200 - Add more Independent Branches options - Part 3 - IndependentBranchesMarcEditing Adds a new system preference IndependentBranchesMarcEditing. If this new syspref is enabled, a librarian can only edit or delete a bib record if his or her logged in branch code matches the branchcode in biblio.branchcode. This feature does not affect the ability to edit or delete items, as that functionality is determined by IndependantBranches. Test Plan: 1) Apply patch 2) Run updatedatabase.pl 3) Map a nonrepeatable field/subfield to biblio.branchcode Pro-tip: Use the authorised value 'branches' to get a pulldown of libraries instead of entering the branchcode manually. 4) Edit a record, and add a branchcode. 5) Log in as a non-superlibrarian with cataloging priveleges 6) Change the logged in branch to a branch other than the one you entered in the record. 7) You should note the 'edit' pulldown for the record is missing the "Edit record" and "Delete record" options. 8) Switch the logged in branch to match the branchcode of the record. 9) You should now see the edit and delete options for that record. 10) Attempt to edit a record with no branchcode defined, you should be able to.
Created attachment 17987 [details] [review] Bug 10200 - Add more Independent Branches options - Part 4 - Add branches_optional for MARC field authorised values This patch adds the branches_optional field to the authorised values pulldown for MARC fields and subfields in the MARC frameworks editor. 'branches_optional' behaves exactly like 'branches' except it includes an "empty" choice so the branch does not have to be set.