[Bug 6151] New: IndependantBranches and HomeOrHoldingBranchReturn can prevent items from being checked in
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6151 Bug #: 6151 Summary: IndependantBranches and HomeOrHoldingBranchReturn can prevent items from being checked in Classification: Unclassified Change sponsored?: Sponsored Product: Koha Version: rel_3_4 Platform: All OS/Version: All Status: ASSIGNED Severity: major Priority: P5 Component: Circulation AssignedTo: ian.walls@bywatersolutions.com ReportedBy: ian.walls@bywatersolutions.com QAContact: koha-bugs@lists.koha-community.org CC: gmcharlt@gmail.com If IndependantBranches is on, and an item is checked into a branch that is not it's current HomeOrHoldBranchReturn branch, a "Wrong Branch" message is given, and the return is denied. This is not always desirable behaviour. For example, some libraries may want an item owned by Branch A but issued from Branch B to be returnable to either A or B (the patron returning the material to A saves the library transit costs), or even to be returnable to Library C if the transit network is robust. More heinous a problem, if an item is issued from Library B, and HomeOrHoldingBranchReturn is set to Homebranch, the patron cannot return the item to Library B. And further, when AutomaticItemReturn is turned on and HomeOrHoldingBranchReturn is HoldingBranch, an item issued from Library B and returned to Library B will not trigger a transfer message to return it to Library A. So, with the two above, if HomeOrHoldingBranchReturn is considered the only adjustable variable (since changing IndependantBranches has many, many consequences, and AutomaticItemReturn is a library policy decision), neither setting will allow for desirable behaviour. -- 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6151 --- Comment #1 from D Ruth Bavousett <ruth@bywatersolutions.com> 2011-06-26 18:29:43 UTC --- Here's a fix that is working for two sites that are on IndependantBranches with AutomaticItemReturn: In C4/Circulation.pm: # FIXME: make this comment intelligible. #adding message if holdingbranch is non equal a userenv branch to return the document to homebranch #we check, if we don't have reserv or transfert for this document, if not, return it to homebranch . + $hbr = $item->{homebranch}; # since that's what all the following code does if (($doreturn or $messages->{'NotIssued'}) and !$resfound and ($branch ne $hbr) and not $messages->{'WrongTransfer'}){ if ( C4::Context->preference("AutomaticItemReturn" ) or (C4::Context->preference("UseBranchTransferLimits") and ! IsBranchTransferAllowed($branch, $hbr, $item->{C4::Context->preference("BranchTransferLimitsType")} ) )) { -- 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6151 --- Comment #2 from Ian Walls <ian.walls@bywatersolutions.com> 2011-12-01 19:43:54 UTC --- Better solution: A new system preference, AllowReturnToBranch, and a subroutine in C4/Circulation to leverage it. Possible syspref values: homebranch holdingbranch (which would correspond to the issuing branch) homebranch OR holdingbranch <== default if IndependantBranches is ON anywhere <== default if IndependantBranches is OFF (and for fresh installs) New C4::Circulation::CanReturnToBranch subroutine Takes in $item object and current branch Returns two values: 1 if return is allowed or 0 if return is forbidden, and the allowed return branch (defaults to homebranch is option is 'homebranch or holdingbranch') Change the conditional in AddReturn to consult this subroutine instead of comparing $branch to $hbr and looking for IndependantBranches syspref. -- 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6151 --- Comment #3 from Ian Walls <ian.walls@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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6151 Ian Walls <ian.walls@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - low |PATCH-Sent Patch Status|--- |Needs Signoff AssignedTo|ian.walls@bywatersolutions. |jonathan.druart@biblibre.co |com |m -- 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6151 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #6497|0 |1 is obsolete| | --- Comment #4 from Chris Cormack <chris@bigballofwax.co.nz> 2011-12-11 00:13:19 UTC --- Created attachment 6701 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=6701 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@catalyst.net.nz> -- 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6151 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz Patch Status|Needs Signoff |Signed Off -- 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6151 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Signed Off |Failed QA --- Comment #5 from Jonathan Druart <jonathan.druart@biblibre.com> 2011-12-14 15:26:25 UTC --- I have tested and reviewed this patch. It works but, isn't it better to have a message in the interface when the return fails ? Currently, this patch does not notify the user when an error occurs. -- 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6151 --- Comment #6 from Ian Walls <ian.walls@bywatersolutions.com> 2011-12-14 22:18:12 UTC --- Jonathan, The message is in the WrongBranch param, and displays which branch they SHOULD be returning it to.... are you saying this isn't showing up? Or are you thinking we need an additional error message? -- 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6151 --- Comment #7 from Jonathan Druart <jonathan.druart@biblibre.com> 2011-12-15 08:54:58 UTC --- Hi Ian, I think I found the problem :) I fact, I check in from the circ/circulation.pl table, and this script call circ/renewscript and not circ/returns.pl. In this script, error messages are not caught and sent to the template. But renewscript.pl redirects to circulation.pl. Thus to transmit the message, it's not easy nor clean :-/ -- 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6151 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #6701|0 |1 is obsolete| | --- Comment #8 from Kyle M Hall <kyle@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@catalyst.net.nz> -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6151 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #11250|0 |1 is obsolete| | --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 11294 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=11294&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@catalyst.net.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6151 --- Comment #10 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 11295 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=11295&action=edit Bug 6151 - Followup - Display message for failed returns on circulation.pl when returning via issues table. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6151 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6151 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #11295|0 |1 is obsolete| | --- Comment #11 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 11410 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=11410&action=edit Bug 6151 - Followup - Display message for failed returns on circulation.pl when returning via issues table. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6151 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|PATCH-Sent (DO NOT USE) |P3 Status|Needs Signoff |Signed Off Version|rel_3_4 |master -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6151 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #12 from Jonathan Druart <jonathan.druart@biblibre.com> --- My previous test still does not work. Maybe you should replace l.470 (circ/circulation.pl) with: $it->{'return_failed'} = $return_failed{$it->{'barcode'}}; the failedreturn param contains a barcode, not an itemnumber. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6151 --- Comment #13 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 11585 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=11585&action=edit Bug 6151 - Followup - Change 'itemnumber' to 'barcode' -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6151 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6151 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #11585|0 |1 is obsolete| | --- Comment #14 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 11595 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=11595&action=edit Bug 6151 - Followup - Change 'itemnumber' to 'barcode' Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6151 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6151 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #11294|0 |1 is obsolete| | Attachment #11410|0 |1 is obsolete| | --- Comment #15 from Mason James <mtj@kohaaloha.com> --- Created attachment 12208 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=12208&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@catalyst.net.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6151 --- Comment #16 from Mason James <mtj@kohaaloha.com> --- Created attachment 12209 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=12209&action=edit Bug 6151 - Followup - Display message for failed returns on circulation.pl when returning via issues table. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6151 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #11595|0 |1 is obsolete| | --- Comment #17 from Mason James <mtj@kohaaloha.com> --- Created attachment 12210 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=12210&action=edit Bug 6151 - Followup - Change 'itemnumber' to 'barcode' Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6151 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |mtj@kohaaloha.com QA Contact|koha-bugs@lists.koha-commun |mtj@kohaaloha.com |ity.org | --- Comment #18 from Mason James <mtj@kohaaloha.com> --- (In reply to comment #17)
Created attachment 12210 [details] Bug 6151 - Followup - Change 'itemnumber' to 'barcode'
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
rebased 3 patches against master '60790d0' all patches apply clean, passing QA... $ koha-qa.pl -c 3 testing 3 commit(s) (applied to commit 60790d0) * 41e46a0 Bug 6151 - Followup - Change 'itemnumber' to 'barcode' circ/circulation.pl * 0b479be Bug 6151 - Followup - Display message for failed returns on circu circ/circulation.pl koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt * 32c3ceb Bug 6151: Add AllowReturnToBranch system preference C4/Circulation.pm admin/systempreferences.pl installer/data/mysql/sysprefs.sql installer/data/mysql/updatedatabase.pl koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref * circ/circulation.pl OK * C4/Circulation.pm OK * admin/systempreferences.pl OK * installer/data/mysql/updatedatabase.pl OK * koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt OK * koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt OK -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6151 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.poulain@biblibre.com --- Comment #19 from Paul Poulain <paul.poulain@biblibre.com> --- Can't this feature be achieved already with branch transfer limits ? I thought that, with this feature activated, one can do much precise return rules than with just a syspref. Looking at the code, I realize I'm wrong: C4/Circulation.pm, sub AddReturn says: if ($hbr ne $branch && C4::Context->preference("IndependantBranches") && !(C4::Context->preference("canreservefromotherbranches"))){ $messages->{'Wrongbranch'} = { Wrongbranch => $branch, Rightbranch => $hbr, }; $doreturn = 0; # bailing out here - in this case, current desired behavior # is to act as if no return ever happened at all. # FIXME - even in an indy branches situation, there should # still be an option for the library to accept the item # and transfer it to its owning library. return ( $doreturn, $messages, $issue, $borrower ); But shouldn't we use the branch_transfer_limit anyway (and not this new syspref) (just throwing asking the question, not rejecting the patch) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6151 --- Comment #20 from Kyle M Hall <kyle@bywatersolutions.com> --- Paul, this is a bug fix, rather than a feature. This patch is to correct a problem that exists in Koha, where using IndependantBranches can result in items not being returnable to a library, even when they should be. This is a problem with returning items, rather than transferring them. Kyle (In reply to comment #19)
Can't this feature be achieved already with branch transfer limits ? I thought that, with this feature activated, one can do much precise return rules than with just a syspref.
Looking at the code, I realize I'm wrong: C4/Circulation.pm, sub AddReturn says:
if ($hbr ne $branch && C4::Context->preference("IndependantBranches") && !(C4::Context->preference("canreservefromotherbranches"))){ $messages->{'Wrongbranch'} = { Wrongbranch => $branch, Rightbranch => $hbr, }; $doreturn = 0; # bailing out here - in this case, current desired behavior # is to act as if no return ever happened at all. # FIXME - even in an indy branches situation, there should # still be an option for the library to accept the item # and transfer it to its owning library. return ( $doreturn, $messages, $issue, $borrower );
But shouldn't we use the branch_transfer_limit anyway (and not this new syspref)
(just throwing asking the question, not rejecting the patch)
-- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6151 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master Version|master |rel_3_8 --- Comment #21 from Paul Poulain <paul.poulain@biblibre.com> --- Patch pushed to master. I've revised my judgement, it's a very handy feature ! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6151 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED --- Comment #22 from Chris Cormack <chris@bigballofwax.co.nz> --- Released in 3.10.0 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org