Bug 23820 - Club hold pickup locations should be able to default to patron's home library
Summary: Club hold pickup locations should be able to default to patron's home library
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Agustín Moyano
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-15 21:28 UTC by Jason Robb
Modified: 2020-09-24 16:05 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.11.00, 20.05.03


Attachments
Bug 23820: Add checkout to default to patron's home branch on club hold (6.79 KB, patch)
2020-03-30 20:50 UTC, Agustín Moyano
Details | Diff | Splinter Review
Bug 23820: Add checkout to default to patron's home branch on club hold (6.86 KB, patch)
2020-03-31 16:53 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 23820: Add test for new behaviour (6.71 KB, patch)
2020-05-29 16:26 UTC, Agustín Moyano
Details | Diff | Splinter Review
Bug 23820: Add checkout to default to patron's home branch on club hold (6.92 KB, patch)
2020-07-05 19:11 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23820: Add test for new behaviour (6.77 KB, patch)
2020-07-05 19:11 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23820: (QA follow-up) Make label clickable for checkbox (1.51 KB, patch)
2020-07-05 19:11 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23820: Fix Koha/Club/Hold.t (1.47 KB, patch)
2020-07-21 08:08 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Robb 2019-10-15 21:28:16 UTC
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.
Comment 1 Agustín Moyano 2020-03-30 20:50:33 UTC
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
Comment 2 ByWater Sandboxes 2020-03-31 16:53:28 UTC
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>
Comment 3 Jason Robb 2020-03-31 16:56:40 UTC
Tested with a sandbox, works as described! Excellent!!
Comment 4 Jonathan Druart 2020-04-27 11:01:24 UTC
Please add tests to cover this change.
Comment 5 Agustín Moyano 2020-05-29 16:26:00 UTC
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
Comment 6 Katrin Fischer 2020-07-05 19:11:14 UTC
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>
Comment 7 Katrin Fischer 2020-07-05 19:11:17 UTC
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>
Comment 8 Katrin Fischer 2020-07-05 19:11:21 UTC
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>
Comment 9 Jonathan Druart 2020-07-20 15:48:11 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 10 Jonathan Druart 2020-07-21 08:08:42 UTC
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.
Comment 11 Jonathan Druart 2020-07-21 10:24:18 UTC
Follow-up pushed to master for 20.11
Comment 12 Lucas Gass 2020-07-27 16:45:30 UTC
backported to 20.05.x for 20.05.03
Comment 13 Aleisha Amohia 2020-08-03 22:55:24 UTC
enhancement, not backported to 19.11.x