Bugzilla – Attachment 154543 Details for
Bug 33074
ReservesControlBranch not taken into account in opac-reserve.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33074: Take ReservesControlBranch into account in opac-reserve.pl
Bug-33074-Take-ReservesControlBranch-into-account-.patch (text/plain), 2.80 KB, created by
ByWater Sandboxes
on 2023-08-17 11:27:43 UTC
(
hide
)
Description:
Bug 33074: Take ReservesControlBranch into account in opac-reserve.pl
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2023-08-17 11:27:43 UTC
Size:
2.80 KB
patch
obsolete
>From d761d9c9170896cee3cf041610efd52543d24fa5 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Mon, 27 Feb 2023 10:05:44 +0100 >Subject: [PATCH] Bug 33074: Take ReservesControlBranch into account in > opac-reserve.pl > >Test plan: >1. Set system preferences: > - Disable OPACAllowUserToChooseBranch > - Set ReservesControlBranch to "item's home library" > - Enable UseBranchTransferLimits > - Set BranchTransferLimitsType to "item type" > - Enable canreservefromotherbranches > - Disable IndependantBranches >2. Create two libraries: ITEM_LIB and PATRON_LIB >3. Set circulation rules: > - Remove all circulation rules (DELETE FROM circulation_rules) > - Set a default rule that allow some holds and with "OPAC item level > holds" = "force". Allow "on shelf" holds for easier testing. > - In the rules for ITEM_LIB, under "Default checkout, hold and return > policy", > - set "Hold policy" to "From any library" > - set "Hold pickup library match" to "item's home library" > - In the rules for PATRON_LIB, under "Default checkout, hold and > return policy", > - set "Hold policy" to "From any library", > - set "Hold pickup library match" to "any library" >4. In "Library transfer limits" disable all transfers from ITEM_LIB to > PATRON_LIB for an item type (let's say "BOOK") >5. Create a biblio with an item: > - item type must be the same as in previous step ("BOOK") > - home branch and holding branch must be ITEM_LIB >6. Create a patron at PATRON_LIB, give it a password so it can log in. >7. Go to OPAC, and login with this patron >8. Try to place a hold for the new item. You should be allowed to place > a hold, but when doing it, no holds will be created. >9. Apply patch, restart Koha >10. Try to place a hold for the new item. This time the hold should be > created > >Signed-off-by: Jessie Zairo <jzairo@bywatersolutions.com> >--- > opac/opac-reserve.pl | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl >index 07440efa6a..c7c59505fc 100755 >--- a/opac/opac-reserve.pl >+++ b/opac/opac-reserve.pl >@@ -231,7 +231,8 @@ if ( $query->param('place_reserve') ) { > # When choosing a specific item, the default pickup library should be dictated by the default hold policy > if ( ! C4::Context->preference("OPACAllowUserToChooseBranch") && $item ) { > my $type = $item->effective_itemtype; >- my $rule = GetBranchItemRule( $patron->branchcode, $type ); >+ my $reserves_control_branch = GetReservesControlBranch($item->unblessed, $patron->unblessed); >+ my $rule = GetBranchItemRule( $reserves_control_branch, $type ); > > if ( $rule->{hold_fulfillment_policy} eq 'any' || $rule->{hold_fulfillment_policy} eq 'patrongroup' ) { > $branch = $patron->branchcode; >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33074
:
147426
|
154543
|
154992
|
156094
|
156366