Summary: | Prevent placing holds on items based on item field values | ||
---|---|---|---|
Product: | Koha | Reporter: | paxed <pasi.kallinen> |
Component: | Hold requests | Assignee: | paxed <pasi.kallinen> |
Status: | Failed QA --- | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | gmcharlt, veron |
Version: | master | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Attachments: |
Add a system preference PreventItemHoldsFieldvalues
Bug 12354 - Prevent reserving items based on item field values |
Description
paxed
2014-06-03 05:57:28 UTC
Created attachment 28630 [details] [review] Add a system preference PreventItemHoldsFieldvalues Bug 12354 - Prevent reserving items based on item field values Add a system preference PreventItemHoldsFieldvalues, which is a pipe-delimited list of "fieldname=value", where fieldname is one of the fields from items -table in the database. If the field has the exact value, the item cannot be reserved. For example, "ccode=PILA|location=OHE" would prevent reserving the item if it's collection code is 'PILA' or if it's location is 'OHE'. To test: 1) Go to the page where you put a hold on an item, and look at the list of items. Note which ones are available for hold and which ones aren't. 2) Apply patch, set the syspref value to eg. homebranch=FOO|biblionumber=12345 3) Check that items with homebranch FOO or items for biblio 12345 cannot be reserved by patrons, and need override permission for staff to reserve. Good feature! ...but patch doesn't apply: Applying: Bug 12354 - Prevent reserving items based on item field values Using index info to reconstruct a base tree... Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref Auto-merging installer/data/mysql/updatedatabase.pl CONFLICT (content): Merge conflict in installer/data/mysql/updatedatabase.pl Auto-merging installer/data/mysql/sysprefs.sql Auto-merging C4/Reserves.pm Failed to merge in the changes. Patch failed at 0001 Bug 12354 - Prevent reserving items based on item field values Created attachment 37501 [details] [review] Bug 12354 - Prevent reserving items based on item field values Add a system preference PreventItemHoldsFieldvalues, which is a pipe-delimited list of "fieldname=value", where fieldname is one of the fields from items -table in the database. If the field has the exact value, the item cannot be reserved. For example, "ccode=PILA|location=OHE" would prevent reserving the item if it's collection code is 'PILA' or if it's location is 'OHE'. To test: 1) Go to the page where you put a hold on an item, and look at the list of items. Note which ones are available for hold and which ones aren't. 2) Apply patch, set the syspref value to eg. homebranch=FOO|biblionumber=12345 3) Check that items with homebranch FOO or items for biblio 12345 cannot be reserved by patrons, and need override permission for staff to reserve. NOTE: This should apply, but is missing tests added to t/db_dependent/Reserves.t -- mtompset This still sounds like an interesting feature, but I believe a change should be made to use a YAML style preference following the exmaple of the similar feature ItemsDeniedRenewal. |