850b4eeab9
In order to solve the issue of IndependantBranches being incompatible with HomeOrHoldingBranchReturn, this patch changes the mechanism by which the question "can I return this material here?" is answered. Before, the conditions were "if IndependantBranches is on, and this branch isn't HomeOrHoldingBranchReturn for the item, then no, otherwise yes". Now, the question is answered by consulting CanBookBeReturned (new subroutine) New system preference: AllowReturnToBranch Possible values: - anywhere (default for new installs, and for existing systems with IndependantBranches turned off) - homebranch - holdingbranch (which is also the issuing branch in all normal circumstances) - homeorholdingbranch (default for existing systems with IndependantBranches turned on) New subroutine: CanBookBeReturned Input: $item hash (from GetItems), and $branchcode Output: 0 or 1 to indicate "allowed" or not, and an optional message if not allowed. Message is the 'correct' branchcode to return the material to To Test: 1. Install patch and new syspref 2. Check that default value of the preference: - if IndependantBranches was OFF at install time, should be 'anywhere' - if IndependantBranches was ON at install time, should be 'homeorholdingbranch' Case: 'anywhere' 1. Checkout a Library A book at Library A. Return at Library A should be successful 2. Repeat step 1, returning to Library B. Return should be successful 3. Checkout a Library A book at Library B. Return to A should be successful 4. Repeat step 3 with Library B and Library C Case: 'homebranch' 1. Checkout a Library A book at Library A. Return at Library A should be successful 2. Repeat step 1, returning to Library B. Return should FAIL (returning message to return at A) 3. Checkout a Library A book at Library B. Return to Library A should be successful 4. Repeat step 3 with Library B and Library C. Both should FAIL (returning message to return at A) Case: 'holdingbranch' 1. Checkout a Library A book at Library A. Return at Library A should be successful 2. Repeat step 1, returning to Library B. Return should FAIL (returning message to return at A) 3. Checkout a Library A book at Library B. Return to A should FAIL (returning message to return at B) 4. Repeat step 3 with Library B. Return should be successful 5. Repeat step 3 with Library C. Return should FAIL (returning message to return at B) Case: 'homeorholdingbranch' 1. Checkout a Library A book at Library A. Return at Library A should be successful 2. Repeat step 1, returning to Library B. Return should FAIL (returning message to return at A) 3. Checkout a Library A book at Library B. Return to A should be successful 4. Repeat step 3 with Library B. Return should be successful 5. Repeat step 3 with Library C. Return should FAIL (returning message to return at A) Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> |
||
---|---|---|
.. | ||
searchengine/solr | ||
admin-home.pl | ||
aqbudget_user_search.pl | ||
aqbudgetperiods.pl | ||
aqbudgets.pl | ||
aqcontract.pl | ||
aqplan.pl | ||
auth_subfields_structure.pl | ||
auth_tag_structure.pl | ||
authorised_values.pl | ||
authtypes.pl | ||
biblio_framework.pl | ||
branch_transfer_limits.pl | ||
branches.pl | ||
categorie.pl | ||
check_budget_parent.pl | ||
check_parent_total.pl | ||
checkmarc.pl | ||
cities.pl | ||
classsources.pl | ||
clone-rules.pl | ||
currency.pl | ||
env_tz_test.pl | ||
fieldmapping.pl | ||
import_export_framework.pl | ||
item_circulation_alerts.pl | ||
itemtypes.pl | ||
koha2marclinks.pl | ||
marc_subfields_structure.pl | ||
marctagstructure.pl | ||
matching-rules.pl | ||
oai_set_mappings.pl | ||
oai_sets.pl | ||
patron-attr-types.pl | ||
preferences.pl | ||
printers.pl | ||
roadtype.pl | ||
smart-rules.pl | ||
stopwords.pl | ||
systempreferences.pl | ||
transport-cost-matrix.pl | ||
z3950servers.pl |