[Bug 27895] New: Internal server error when trying to change picup location for a hold with no valid locations
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27895 Bug ID: 27895 Summary: Internal server error when trying to change picup location for a hold with no valid locations Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal 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 If 'AllowHoldPolicyOverride' is set to 'Allow' staff can place a hold that has no allowed pickup locations. If staff try to alter the pickup location from the patron's record there is an internal server error To test: 1 - Set 'Default checkout, hold and return policy' on Admin->Circ rules to Hold policy: From home library Hold pickup library match: Item's home library 2 - Set AllowHoldPolicyOverride to Allow 3 - Place an item level hold for a patron on an item from another branch - there should be a warn while placing, but hold is allowed 4 - Bring up the patron details or checkout page 5 - Click the holds tab 6 - Try to change the hold pickup location 7 - You get an error: There was an error:error Internal Server Error 8 - In logs: The method Koha::Libraries->branchcode is not covered by tests! Trace begun at /kohadevbox/koha/Koha/Objects.pm line 592 Koha::Objects::AUTOLOAD('Koha::Libraries=HASH(0x5631e45dc298)') called at /kohadevbox/koha/Koha/Hold.pm line 252 Koha::Hold::__ANON__ at /kohadevbox/koha/Koha/Hold.pm line 252 Koha::Hold::is_pickup_location_valid('Koha::Hold=HASH(0x5631e448ae48)', 'HASH(0x5631e45cf638)') called at t/db_dependent/Koha/Hold.t line 203 -- 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=27895 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 117923 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117923&action=edit Bug 27895: Unit test -- 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=27895 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=27895 --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 125781 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125781&action=edit Bug 27895: Prepare pickup locations for overridden holds The logic in request.pl only passes pickup locations if a hold is allowed, they are not calculated when the hold is overridden. This patch copies the pickup locations code into the override conditional, adjusting to mark the item overridden This also highlights an condition of override: If a hold is allowed, but there are no valid pickup locations the override is not allowed. To test: 1 - Set a holds rule to allow on-shelf holds only if all unavailable 2 - Set AllowHoldPolicyOverride to 'Allow' 3 - Find a record with several items available 4 - Attempt to place a hold 5 - The items have a yellow triangle, but no pickup locations 6 - Place an item level hold 7 - Note the hold has no pickup location 8 - Cancel the hold 9 - Apply patch and restart all 10 - Attempt hold again 11 - Items still have yellow triangle, but there are dropdowns for pickup location 12 - Place an item level hold, verify a pickup location is set 13 - Cancel the hold 14 - Alter circ rule to allow on shelf holds 15 - Change 'Default checkout, hold and return policy' - 'Hold pickup library match' to "item's hold group" 16 - Ensure there is no group for the item 17 - Attempt to place hold 18 - Override is not allowed 'No valid pickup locations' -- 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=27895 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=28748 Status|Needs Signoff |ASSIGNED -- 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=27895 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Internal server error when |Internal server error when |trying to change picup |trying to change pickup |location for a hold with no |location for a hold with no |valid locations |valid locations -- 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=27895 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Patches are on the wrong reports ?? -- 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=27895 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |31169 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31169 [Bug 31169] [OMNIBUS] Problems with forced holds (AllowHoldPolicyOverride) -- 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=27895 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Nick, can you have a look at the patches attached here please? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org