Bug 10200 - Add more Independent Branches options
Summary: Add more Independent Branches options
Status: RESOLVED MOVED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Kyle M Hall
QA Contact:
URL:
Keywords:
Depends on: 10080 10206
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-06 13:41 UTC by Kyle M Hall
Modified: 2013-05-16 18:30 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 10200 - Add more Independent Branches options - Part 1 - IndependentBranchesIntranetSearch (11.45 KB, patch)
2013-05-06 13:47 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 10200 - Add more Independent Branches options - Part 1 - IndependentBranchesIntranetSearch (11.68 KB, patch)
2013-05-06 13:50 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 10200 - Add more Independent Branches options - Part 2 - IndependentBranchesOpacSearch (8.38 KB, patch)
2013-05-06 14:32 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 10200 - Add more Independent Branches options - Part 1 - IndependentBranchesIntranetSearch (11.68 KB, patch)
2013-05-07 14:04 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 10200 - Add more Independent Branches options - Part 3 - IndependentBranchesMarcEditing (11.44 KB, patch)
2013-05-07 14:04 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 10200 - Add more Independent Branches options - Part 4 - Add branches_optional for MARC field authorised values (2.20 KB, patch)
2013-05-07 14:04 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 10200 - Add more Independent Branches options - Part 1 - IndependentBranchesIntranetSearch (11.74 KB, patch)
2013-05-07 14:36 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 10200 - Add more Independent Branches options - Part 2 - IndependentBranchesOpacSearch (8.23 KB, patch)
2013-05-07 14:38 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 10200 - Add more Independent Branches options - Part 3 - IndependentBranchesMarcEditing (11.44 KB, patch)
2013-05-07 14:39 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 10200 - Add more Independent Branches options - Part 4 - Add branches_optional for MARC field authorised values (2.20 KB, patch)
2013-05-07 14:39 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2013-05-06 13:41:20 UTC
* 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).
Comment 1 Kyle M Hall 2013-05-06 13:47:58 UTC Comment hidden (obsolete)
Comment 2 Kyle M Hall 2013-05-06 13:50:57 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall 2013-05-06 14:32:00 UTC Comment hidden (obsolete)
Comment 4 Kyle M Hall 2013-05-07 14:04:17 UTC Comment hidden (obsolete)
Comment 5 Kyle M Hall 2013-05-07 14:04:33 UTC Comment hidden (obsolete)
Comment 6 Kyle M Hall 2013-05-07 14:04:42 UTC Comment hidden (obsolete)
Comment 7 Kyle M Hall 2013-05-07 14:36:50 UTC
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.
Comment 8 Kyle M Hall 2013-05-07 14:38:43 UTC
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.
Comment 9 Kyle M Hall 2013-05-07 14:39:03 UTC
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.
Comment 10 Kyle M Hall 2013-05-07 14:39:16 UTC
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.