[Koha-bugs] [Bug 6151] IndependantBranches and HomeOrHoldingBranchReturn can prevent items from being checked in

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Dec 1 22:36:04 CET 2011


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6151

--- Comment #3 from Ian Walls <ian.walls at bywatersolutions.com> 2011-12-01 21:36:04 UTC ---
Created attachment 6497
  --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=6497
Proposed Patch

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)

-- 
Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list