[Bug 27529] New: Cannot place hold on OPAC if hold_fullfillment_policy is set to group and OPACAllowUserToChooseBranch not allowed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27529 Bug ID: 27529 Summary: Cannot place hold on OPAC if hold_fullfillment_policy is set to group and OPACAllowUserToChooseBranch not allowed Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Hold requests Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com In opac/opac-reserve.pl: 243 # When choosing a specific item, the default pickup library should be dictated by the default hold policy 244 if ( ! C4::Context->preference("OPACAllowUserToChooseBranch") && $itemNum ) { 245 my $item = Koha::Items->find( $itemNum ); 246 my $type = $item->effective_itemtype; 247 my $rule = GetBranchItemRule( $patron->branchcode, $type ); 248 if ( $rule->{hold_fulfillment_policy} eq 'any' ) { 249 $branch = $patron->branchcode; 250 } else { 251 my $policy = $rule->{hold_fulfillment_policy}; 252 $branch = $item->$policy; 253 } 254 } 255 $branch = $item->$policy; is problematic for group values 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 The method Koha::Item->patrongroup is not covered by tests! The method Koha::Item->itemgroup is not covered by tests! -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27529 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |22284 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22284 [Bug 22284] Add ability to define groups of locations for hold pickup -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27529 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com --- Comment #1 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- The behavior with hold groups should mirror the behavior without them. If we set hold_fulfillment_policy to Any Library and OPACAllowUserToChooseBranch to not allowed, Koha defaults OPAC holds to the patron's home library for the pickup location. So when hold_fulfillment_policy is set to patron's hold group, we should do the same and set to the pickup location to the patron's home library, which will by definition be in the patron's hold group and therefore a valid pickup location. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27529 Lisette Scheer <lisetteslatah@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lisetteslatah@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27529 --- Comment #2 from Lisette Scheer <lisetteslatah@gmail.com> --- (In reply to Andrew Fuerste-Henry from comment #1)
The behavior with hold groups should mirror the behavior without them. If we set hold_fulfillment_policy to Any Library and OPACAllowUserToChooseBranch to not allowed, Koha defaults OPAC holds to the patron's home library for the pickup location. So when hold_fulfillment_policy is set to patron's hold group, we should do the same and set to the pickup location to the patron's home library, which will by definition be in the patron's hold group and therefore a valid pickup location.
Agreed, this is what we expected when we set up hold groups. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27529 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27529 --- Comment #3 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 115782 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115782&action=edit 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 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27529 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27529 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #4 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- I'm still getting an error after applying the patch: The method Koha::Item->holdgroup is not covered by tests! Trace begun at /kohadevbox/koha/Koha/Object.pm line 827 Koha::Object::AUTOLOAD('Koha::Item=HASH(0x55b488f14d30)') called at /kohadevbox/koha/opac/opac-reserve.pl line 255 eval {...} at /kohadevbox/koha/opac/opac-reserve.pl line 2 That's with Hold Pickup Library Match set to item's hold group, reservescontrol set to patron's library. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27529 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27529 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #115782|0 |1 is obsolete| | --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 118975 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118975&action=edit 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27529 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27529 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118975|0 |1 is obsolete| | --- Comment #6 from David Nind <david@davidnind.com> --- Created attachment 119162 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119162&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27529 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #119162|0 |1 is obsolete| | --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 119708 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119708&action=edit 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> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27529 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|Signed Off |Passed QA --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Trivial patch works as expected, no QA script failures. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27529 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |21.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27529 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 21.05, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27529 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|21.05.00 |21.05.00,20.11.05 released in| | CC| |fridolin.somers@biblibre.co | |m --- Comment #10 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 20.11.x for 20.11.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27529 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Version(s)|21.05.00,20.11.05 |21.05.00,20.11.05,20.05.11 released in| | --- Comment #11 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Pushed to 20.05.x for 20.05.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27529 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |victor@tuxayo.net Status|Pushed to oldstable |RESOLVED --- Comment #12 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Missing dependencies for 19.11.x, it shouldn't be affected, no backport. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org