[Bug 27863] New: Holds API route for pickup_libraries should return all branches if 'AllowHoldPolicyOverride' is enabled
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27863 Bug ID: 27863 Summary: Holds API route for pickup_libraries should return all branches if 'AllowHoldPolicyOverride' is enabled 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 Currently the dropdown for 'pickup library' on request.pl for existing holds returns only libraries allowed by circulation rules Previously libraries were able to select any library. In the case of a hold that violates rules staff would like the ability to override the allowed list if 'AllowHoldPolicyOverride' is enabled The list of libraries should provide some visual feedback to indicate which libraries are allowed, and which ones can be forced -- 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=27863 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.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=27863 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |26988 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26988 [Bug 26988] Defer loading the hold pickup locations until the dropdown is selected -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27863 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |27864 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27864 [Bug 27864] Pickup locations while placing a hold on the staff client should respect hold fulfillment policies -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27863 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |27865 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27865 [Bug 27865] Hold pickup location dropdown on patron pages should respect hold fulfillment policies -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27863 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27863 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27863 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |27760 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- It needs to be implemented in a way we can request to override limits (you may still want to be able to retrieve *only* the valid pickup locations, for other purposes (e.g. for the visual feedback you mention). Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27760 [Bug 27760] Add handling for x-koha-override -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27863 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Hold requests |REST API Status|ASSIGNED |Needs Signoff Summary|Holds API route for |Add a way to override |pickup_libraries should |constraints on |return all branches if |pickup_libraries route if |'AllowHoldPolicyOverride' |'AllowHoldPolicyOverride' |is enabled |is enabled -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27863 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 117757 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117757&action=edit Bug 27863: Unit tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27863 --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 117758 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117758&action=edit Bug 27863: Add a way to override pickup locations constraints If AllowHoldPolicyOverride is set, staff members are able to choose any branch marked as pickup location for a hold. The route for retrieving the valid pickup locations should provide a way to request the override. This patch does that, based on work from bug 27760. A new parameter is added: an x-koha-override header, with the value of 'any' that will force the override if the syspref is enabled. To test: 1. Apply this patches 2. Run: $ kshell k$ prove t/db_dependent/api/v1/holds.t => SUCCESS: Tests pass! 3. Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27863 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org, | |kyle@bywatersolutions.com, | |martin.renvoize@ptfs-europe | |.com --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I think this is the right approach for this series of bugs, related to rendering pickup locations. One doubt remains: I picked the 'any' value for x-koha-override. But the implementation does a Koha::Libraries->search({ pickup_location => 1 }) when the override is passed and conditions met... and I was wondering, could we want to override that condition as well? If we consider that could be necessary, then we should use something like 'object_pickup_locations' (sorry, didn't find something better) and then pick some other keyword for pickup_location => 1, and reserve 'any' for overriding them all. Hope my doubt makes sense, and I get some valuable feedback. Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27863 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |WONTFIX Status|Needs Signoff |RESOLVED --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I'm going other route to fix this. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27863 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Summary|Add a way to override |Cannot select different |constraints on |pickup locations even with |pickup_libraries route if |AllowHoldsPolicyOverride on |'AllowHoldPolicyOverride' |request.pl |is enabled | Resolution|WONTFIX |--- -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27863 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27863 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27863 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #117757|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27863 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #117758|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27863 --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 117874 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117874&action=edit Bug 27863: Use the /libraries route when AllowHoldsPolicyOverride is set This patch makes the dropdown for changing the pickup location for existing holds use the GET /libraries route instead of GET /holds/:hold_id/pikcup_locations if the configuration allows the override. Terminology: - Pickup location, means a library that is marked as valid pickup location on its configuration. To test: 1. Have the circ rules set so 'Hold pickup library match' is set to 'Item's home library' or 'Any'. The goal is to be able to differentiate when all libraries are returned, from the case only 'valid pickup locations' are returned. The easiest one is 'Item's home library'. 2. Set AllowHoldsPolicyOverride 3. Pick a patron from a library that is not a valid pickup location and an item that belongs to a library that doesn't match any of the valid ones. => SUCCESS: Notice Koha allows you to choose any library (because of the syspref) 4. Place the hold. 5. Now check on the holds list for the bib, if you can use the dropdown to change the pickup location for the hold => SUCCESS: You can, sort of => FAIL: It doesn't show/search all pickup locations. It only shows the valid ones, even though we should be able to override it. 6. Apply this patch 7. Restart all just in case, and reload the holds page for the bib 8. Repeat 5 => SUCCESS: You are presented all pickup locations! 9. Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27863 --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Looking at how the templates use the Branches plugin to render pickup location lists, I believe this is the way to go. I'll move the visual feedback part to a separate enhancement bug once I sort the best way to achieve it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27863 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|27760 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27760 [Bug 27760] Add handling for x-koha-override -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27863 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |27894 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27894 [Bug 27894] Add visual feedback on overridden pickup locations -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27863 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #8 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- When placing a new hold with pickup library match set to Item's Holding Library and AllowHoldPolicyOverride set to Allow, I am not given the option of setting a pickup branch other that the item's holdingbranch, with or without the patch. I should be able to pick whatever branch I want when placing the hold, rather than having to place it and then edit the pickup branch to something else. The changes to pickup branch selection on existing holds works great! I agree that it'd be good to have some indicator within that dropdown of which branches follow the rules and which require an override, though it makes sense to follow up on that in a separate bug. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27863 --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Andrew Fuerste-Henry from comment #8)
When placing a new hold with pickup library match set to Item's Holding Library and AllowHoldPolicyOverride set to Allow, I am not given the option of setting a pickup branch other that the item's holdingbranch, with or without the patch. I should be able to pick whatever branch I want when placing the hold, rather than having to place it and then edit the pickup branch to something else.
The changes to pickup branch selection on existing holds works great! I agree that it'd be good to have some indicator within that dropdown of which branches follow the rules and which require an override, though it makes sense to follow up on that in a separate bug.
Are you sure that's not *another* holds bug? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27863 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27863 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #117874|0 |1 is obsolete| | --- Comment #10 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 117937 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117937&action=edit Bug 27863: Use the /libraries route when AllowHoldsPolicyOverride is set This patch makes the dropdown for changing the pickup location for existing holds use the GET /libraries route instead of GET /holds/:hold_id/pikcup_locations if the configuration allows the override. Terminology: - Pickup location, means a library that is marked as valid pickup location on its configuration. To test: 1. Have the circ rules set so 'Hold pickup library match' is set to 'Item's home library' or 'Any'. The goal is to be able to differentiate when all libraries are returned, from the case only 'valid pickup locations' are returned. The easiest one is 'Item's home library'. 2. Set AllowHoldsPolicyOverride 3. Pick a patron from a library that is not a valid pickup location and an item that belongs to a library that doesn't match any of the valid ones. => SUCCESS: Notice Koha allows you to choose any library (because of the syspref) 4. Place the hold. 5. Now check on the holds list for the bib, if you can use the dropdown to change the pickup location for the hold => SUCCESS: You can, sort of => FAIL: It doesn't show/search all pickup locations. It only shows the valid ones, even though we should be able to override it. 6. Apply this patch 7. Restart all just in case, and reload the holds page for the bib 8. Repeat 5 => SUCCESS: You are presented all pickup locations! 9. Sign off :-D Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27863 --- Comment #11 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Tomas pointed out the dropdown on a new hold is to be handled in bug 27894. Therefore signing off here. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27863 Margaret Hade <margaret@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |margaret@bywatersolutions.c | |om -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27863 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #117937|0 |1 is obsolete| | --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 117958 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117958&action=edit Bug 27863: Use the /libraries route when AllowHoldsPolicyOverride is set This patch makes the dropdown for changing the pickup location for existing holds use the GET /libraries route instead of GET /holds/:hold_id/pikcup_locations if the configuration allows the override. Terminology: - Pickup location, means a library that is marked as valid pickup location on its configuration. To test: 1. Have the circ rules set so 'Hold pickup library match' is set to 'Item's home library' or 'Any'. The goal is to be able to differentiate when all libraries are returned, from the case only 'valid pickup locations' are returned. The easiest one is 'Item's home library'. 2. Set AllowHoldsPolicyOverride 3. Pick a patron from a library that is not a valid pickup location and an item that belongs to a library that doesn't match any of the valid ones. => SUCCESS: Notice Koha allows you to choose any library (because of the syspref) 4. Place the hold. 5. Now check on the holds list for the bib, if you can use the dropdown to change the pickup location for the hold => SUCCESS: You can, sort of => FAIL: It doesn't show/search all pickup locations. It only shows the valid ones, even though we should be able to override it. 6. Apply this patch 7. Restart all just in case, and reload the holds page for the bib 8. Repeat 5 => SUCCESS: You are presented all pickup locations! 9. Sign off :-D Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.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=27863 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Tomas and I discussed this one at length and agreed upon the approach taken. All works as expected now and passes QA script. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27863 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=27863 --- Comment #14 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=27863 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #15 from Fridolin Somers <fridolin.somers@biblibre.com> --- Does not apply because of Bug 27016 Please create a new patch for 20.11.x if needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27863 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=27016 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org