Description
Jason Robb
2019-10-15 21:28:16 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 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 |