Bugzilla – Attachment 119162 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.96 KB, created by
David Nind
on 2021-04-03 17:58:44 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:
David Nind
Created:
2021-04-03 17:58:44 UTC
Size:
1.96 KB
patch
obsolete
>From 4789ca8fe88a84ccae1ebb9afcdf9ef23caac126 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 > >Signed-off-by: David Nind <david@davidnind.com> >--- > 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 9b7680759d..a6182400ad 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 'holdgroup' ){ >+ $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