Bugzilla – Attachment 115782 Details for
Bug 27529
Cannot place hold on OPAC if hold_fullfillment_policy is set to group and OPACAllowUserToChooseBranch not allowed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27529: Choose patron's branch or item's homebranch if following group rules and patron cannot choose branch
Bug-27529-Choose-patrons-branch-or-items-homebranc.patch (text/plain), 1.91 KB, created by
Nick Clemens (kidclamp)
on 2021-01-25 15:37:46 UTC
(
hide
)
Description:
Bug 27529: Choose patron's branch or item's homebranch if following group rules and patron cannot choose branch
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2021-01-25 15:37:46 UTC
Size:
1.91 KB
patch
obsolete
>From 1c56b7a488c96ed8f62d8a4b2471110dd1da61f4 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Mon, 25 Jan 2021 15:34:31 +0000 >Subject: [PATCH] Bug 27529: Choose patron's branch or item's homebranch if > following group rules and patron cannot choose branch > >This patch defaults the holds pickup location to the items homebranch or the patron's branch when a group option is selected >for the hold fulfillment policy and the patron is not allowed to choose the branch on the OPAC > >To test: >1 - Set 'Default checkout, hold and return policy' -> 'Hold pickup library match' to item's hold group or patron's hold group >2 - Set OPACAllowUserToChooseBranch to 'Don't allow' >3 - Try to place an item level hold on the opac >4 - Ka-boom, etiher: > The method Koha::Item->patrongroup is not covered by tests! > The method Koha::Item->itemgroup is not covered by tests! >5 - Apply patch >6 - Repeat >7 - Note the pickup location is set to either the patron's branch or the items homebranch >8 - Repeat plan with the other group setting >--- > opac/opac-reserve.pl | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl >index b90a2061b2..d0d2c4680d 100755 >--- a/opac/opac-reserve.pl >+++ b/opac/opac-reserve.pl >@@ -246,8 +246,10 @@ if ( $query->param('place_reserve') ) { > my $type = $item->effective_itemtype; > my $rule = GetBranchItemRule( $patron->branchcode, $type ); > >- if ( $rule->{hold_fulfillment_policy} eq 'any' ) { >+ if ( $rule->{hold_fulfillment_policy} eq 'any' || $rule->{hold_fulfillment_policy} eq 'patrongroup' ) { > $branch = $patron->branchcode; >+ } elsif ( $rule->{hold_fulfillment_policy} eq 'itemgroup' ){ >+ $branch = $item->homebranch; > } else { > my $policy = $rule->{hold_fulfillment_policy}; > $branch = $item->$policy; >-- >2.11.0
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 27529
:
115782
|
118975
|
119162
|
119708