[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
Wed Aug 1 14:40:05 CEST 2012


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

Kyle M Hall <kyle at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #6701|0                           |1
        is obsolete|                            |

--- Comment #8 from Kyle M Hall <kyle at bywatersolutions.com> ---
Created attachment 11250
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=11250&action=edit
Bug 6151: Add AllowReturnToBranch system preference

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 at catalyst.net.nz>

-- 
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