Currently club holds force you to choose a single, specific pickup location when placing holds for the club. This isn't ideal in a multibranch/consortial setting. It would be nice if there were an option to default the pickup location to the patron's home branch for holds placed with clubs. My use case involves clubs for specific authors. For example, I want to create a 'Stuart Woods' club that patrons can join, then whenever a new Stuart Woods title is added, staff place a club hold that hits every patron enrolled. Right now, if I take three different patrons from three different branches and add them to a single club, I will be forced to select a single pickup location which may be inaccessible to some or all of the patrons. To set three different pickup locations, I would need to place three different club holds for three different clubs. That has potential to get very messy, very quickly. Each branch would need a club for each author, which then makes it easy to enroll patrons in the wrong club and get their holds sent to the wrong branch. Ideally, all three patrons should be able to join a single club and get their holds sent to their respective home branches for pick up.
Created attachment 102093 [details] [review] Bug 23820: Add checkout to default to patron's home branch on club hold This patch adds a checkbox to make holds created by club hold to default to patron's home branch if possible. To test: 1. Apply this patch 2. Create a club, and add two patrons (from now on called patron A and patron B) to it, each one form a different library.. 3. Create a hold for the club, and in the details set pickup location different from any of the patrons. 4. Check "Pickup at patron's home library when possible" checkbox SUCCESS => when submitted, pickup location of holds defaults to patron's home branch 5. Modify patron A's library and set pickup location to no. 6. Repeat steps 3 and 4. SUCCESS => when submitted, patron A's hold now points to pickup location setted on step 3, and patron B's hold still points to his home branch. 7. Sign off Sponsored-by: Southeast Kansas Library - SEKLS
Created attachment 102153 [details] [review] Bug 23820: Add checkout to default to patron's home branch on club hold This patch adds a checkbox to make holds created by club hold to default to patron's home branch if possible. To test: 1. Apply this patch 2. Create a club, and add two patrons (from now on called patron A and patron B) to it, each one form a different library.. 3. Create a hold for the club, and in the details set pickup location different from any of the patrons. 4. Check "Pickup at patron's home library when possible" checkbox SUCCESS => when submitted, pickup location of holds defaults to patron's home branch 5. Modify patron A's library and set pickup location to no. 6. Repeat steps 3 and 4. SUCCESS => when submitted, patron A's hold now points to pickup location setted on step 3, and patron B's hold still points to his home branch. 7. Sign off Sponsored-by: Southeast Kansas Library - SEKLS Signed-off-by: Jason Robb <jrobb@sekls.org>
Tested with a sandbox, works as described! Excellent!!
Please add tests to cover this change.
Created attachment 105437 [details] [review] Bug 23820: Add test for new behaviour To test: 1. prove t/db_dependent/api/v1/clubs_holds.t 2. Sign off Sponsored-by: Southeast Kansas Library - SEKLS
Created attachment 106561 [details] [review] Bug 23820: Add checkout to default to patron's home branch on club hold This patch adds a checkbox to make holds created by club hold to default to patron's home branch if possible. To test: 1. Apply this patch 2. Create a club, and add two patrons (from now on called patron A and patron B) to it, each one form a different library.. 3. Create a hold for the club, and in the details set pickup location different from any of the patrons. 4. Check "Pickup at patron's home library when possible" checkbox SUCCESS => when submitted, pickup location of holds defaults to patron's home branch 5. Modify patron A's library and set pickup location to no. 6. Repeat steps 3 and 4. SUCCESS => when submitted, patron A's hold now points to pickup location setted on step 3, and patron B's hold still points to his home branch. 7. Sign off Sponsored-by: Southeast Kansas Library - SEKLS Signed-off-by: Jason Robb <jrobb@sekls.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 106562 [details] [review] Bug 23820: Add test for new behaviour To test: 1. prove t/db_dependent/api/v1/clubs_holds.t 2. Sign off Sponsored-by: Southeast Kansas Library - SEKLS Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 106563 [details] [review] Bug 23820: (QA follow-up) Make label clickable for checkbox By adding an id the checkbox is selected when the label is clicked enhancing usability. Also adds a colon : to the label. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to master for 20.11, thanks to everybody involved!
Created attachment 107128 [details] [review] Bug 23820: Fix Koha/Club/Hold.t kohadev-koha@kohadevbox:/kohadevbox/koha$ prove t/db_dependent/Koha/Club/Hold.t t/db_dependent/Koha/Club/Hold.t .. Patron(238) Hold cannot be placed. Reason: libraryNotPickupLocation at /kohadevbox/koha/Koha/Club/Hold.pm line 98. # Looks like you planned 5 tests but ran 4. t/db_dependent/Koha/Club/Hold.t .. 1/1 # Failed test 'add' # at t/db_dependent/Koha/Club/Hold.t line 86. Can't call method "borrowernumber" on an undefined value at t/db_dependent/Koha/Club/Hold.t line 83.
Follow-up pushed to master for 20.11
backported to 20.05.x for 20.05.03
enhancement, not backported to 19.11.x