Summary: | Internal server error when trying to change pickup location for a hold with no valid locations | ||
---|---|---|---|
Product: | Koha | Reporter: | Nick Clemens (kidclamp) <nick> |
Component: | Hold requests | Assignee: | Bugs List <koha-bugs> |
Status: | ASSIGNED --- | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | gmcharlt, m.de.rooy |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28748 | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Bug Depends on: | 31169 | ||
Bug Blocks: | |||
Attachments: |
Bug 27895: Unit test
Bug 27895: Prepare pickup locations for overridden holds |
Description
Nick Clemens (kidclamp)
2021-03-08 14:27:09 UTC
Created attachment 117923 [details] [review] Bug 27895: Unit test Created attachment 125781 [details] [review] 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' Patches are on the wrong reports ?? Nick, can you have a look at the patches attached here please? |