[Bug 41313] New: When querying for available pickup locations for a biblio, invalid choices are provided
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41313 Bug ID: 41313 Summary: When querying for available pickup locations for a biblio, invalid choices are provided Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Hold requests Assignee: koha-bugs@lists.koha-community.org Reporter: arthur.suzuki@biblibre.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, lisette@bywatersolutions.com, tomascohen@gmail.com When branch transfer limits are in use, the call to /biblios/[id]/pickup_locations gives available pickup locations for all items, regardless of the holdability of the items. This can lead to have wrong choices provided by the api. Since reserve/request.pl also rely on the api to display the available pickup location this can lead to show record-level hold as possible with some available pickup locations although no items are available due to branch transfer limits. -- 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=41313 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=22330 -- 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=41313 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |arthur.suzuki@biblibre.com |ity.org | -- 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=41313 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also|https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=22330 | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41313 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=41768 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41313 Thibaud Guillot (thibaud_g) <thibaud.guillot@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Depends on| |20985 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20985 [Bug 20985] CanBookBeReserved and CanItemBeReserved should check 'On shelf holds allowed' policy -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41313 --- Comment #1 from Thibaud Guillot (thibaud_g) <thibaud.guillot@biblibre.com> --- Created attachment 201660 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201660&action=edit Bug 41313: only provide pickup locations for holdable items Test plan : - set "AllowHoldPolicyOverride" to "Don't allow" - set "UseBranchTransferLimits" to "enforce" and "BranchTransferLimitsType" to "collection code" - set "ReserveControlBranch" to "item library" - go to branch transfer limit configuration and clear/disallow all. - add a new circulation rule in centerville to allow record-level holds and set "onshelfholdsallowed" to "if any unavailable". - add a new circulation rule in midway to allow record-level holds but set "onshelfholdsallowed" to "Yes". - go to http://localhost:8081/cgi-bin/koha/reserve/request.pl?borrowernumber=51&biblionumber=155 - see that all libraries are available for pickup (although transfer are disallowed) - apply patch, restart_all, reload page - see that no pickup locations are available and record-level holds are thus not possible. Sponsored-by: BibLibre -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41313 --- Comment #2 from Thibaud Guillot (thibaud_g) <thibaud.guillot@biblibre.com> --- Created attachment 201661 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201661&action=edit Bug 41313: (follow-up) Also filter out non-holdable items in Koha::Item->pickup_locations This patch mirrors the exact same protection directly in Koha::Item->pickup_locations(): no pickup location is returned when CanItemBeReserved() does not return status 'OK' for the given item/patron (onshelfholds, reservesallowed, holds_per_record, holds_per_day, max_holds, holdallowed, age restriction, damaged, already-held/possessed, recall...). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41313 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #3 from David Nind <david@davidnind.com> --- This did not work for me after the patches (see my testing notes): 1. All the pickup locations are still shown for "Pickup at" under "Hold next available item". 2. For "Hold a specific item": - The three items are listed (before the patch, they were not listed) - Holds can be placed for the two items located at Midway - For the item located at Centerville, there is a message in red: "No valid pickup location" in the "Hold" column 3. If other settings are required to make this work as per the test plan, then please include them in the test plan. Notes: 1. The bug title should be be in sentence case. That is, start with "Bug 41313: Only...", not "Bug 41313: only". 2. It needs a description. 3. Please number the test plan steps, as it makes it easier to comment. 4. Some steps in the test plan are incorrect or not clear. 5. See commit message guidelines: https://wiki.koha-community.org/wiki/Commit_messages Testing notes (using KTD): 1. AllowHoldPolicyOverride: default in KTD is "Don't allow" 2. UseBranchTransferLimits: change from "Don't enforce" to "Enforce", BranchTransferLimitsType default in KTD is "collection code". 3. There is no ReserveControlBranch system preference, it is ReservesControlBranch (Reserves with an s at the end); set to "item's home library" 4. "branch transfer limit configuration" - this located under Administration > Patrons and circulation > Library transfer limits (Advanced editor) 5. For each collection code tab, click "Clear all", then click "Save" once done. 6. New circulation rules: - Clone the "All All" rule to Centerville and Midway - Edit rules as per the test plan: . Allow record-level holds: is this the default? Don't see any setting sto change. . Centerville: . On shelf holds allowed: set to "in any unavailable" . Midway: . On shelf holds allowed: set to "Yes" (default All All rule) 7. When placing a hold for "The Korean Go Association's learn to play go": - Before the patch: . Hold next available item: all the pickup locations are shown . Hold a specific item: can't place a hold for a specific item as there are now items shown in the table - After the patch: . Hold next available item: all the pickup locations are still shown . Hold a specific item: - The three items are listed (before the patch, they were not listed) - Holds can be placed for the two items located at Midway - For the item located at Centerville, there is a message in red: "No valid pickup location" in the "Hold" column -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org