Bug 29115

Summary: Placing a club hold is not showing warnings when unable to place a hold
Product: Koha Reporter: Joonas Kylmälä <joonas.kylmala>
Component: Hold requestsAssignee: Joonas Kylmälä <joonas.kylmala>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: andrewfh, david, fridolin.somers, gmcharlt, jonathan.druart, kyle, victor
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29116
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
This fixes placing club holds so that checks are correctly made and warning messages displayed when patrons are debarred or have outstanding fees and charges.
Version(s) released in:
22.05.00,21.11.01,21.05.08
Attachments: Bug 29115: Fix syntax errors in club hold functionality
Bug 29115: Fix syntax errors in club hold functionality
Bug 29115: Fix syntax errors in club hold functionality

Description Joonas Kylmälä 2021-09-26 15:36:24 UTC
The code that is supposed to show warnings if someone in a club cannot reserve the item when placing a club hold is broken and not showing the warnings.
Comment 1 Joonas Kylmälä 2021-09-26 15:51:23 UTC
Created attachment 125340 [details] [review]
Bug 29115: Fix syntax errors in club hold functionality

The code didn't previously correctly do the checks for patron
debarment status and whether the patron has fees, this caused the
intended warnings messages to not appear when they should have.

To test:
 1) Create a new club and add a patron to it who has manual debarment
    and a manual charge of over $5 (more than the maxoutstanding syspref).
 2) Try to create a new club hold for the previously created club and
    notice no warnings are listed for the patron.
 3) Apply patch
 4) Try to create now the club hold again and notice the warnings
    being shown in the hold page.
Comment 2 David Nind 2021-10-12 09:48:12 UTC
Created attachment 126083 [details] [review]
Bug 29115: Fix syntax errors in club hold functionality

The code didn't previously correctly do the checks for patron
debarment status and whether the patron has fees, this caused the
intended warnings messages to not appear when they should have.

To test:
 1) Create a new club and add a patron to it who has manual debarment
    and a manual charge of over $5 (more than the maxoutstanding syspref).
 2) Try to create a new club hold for the previously created club and
    notice no warnings are listed for the patron.
 3) Apply patch
 4) Try to create now the club hold again and notice the warnings
    being shown in the hold page.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Jonathan Druart 2021-12-01 14:50:16 UTC
Created attachment 128130 [details] [review]
Bug 29115: Fix syntax errors in club hold functionality

The code didn't previously correctly do the checks for patron
debarment status and whether the patron has fees, this caused the
intended warnings messages to not appear when they should have.

To test:
 1) Create a new club and add a patron to it who has manual debarment
    and a manual charge of over $5 (more than the maxoutstanding syspref).
 2) Try to create a new club hold for the previously created club and
    notice no warnings are listed for the patron.
 3) Apply patch
 4) Try to create now the club hold again and notice the warnings
    being shown in the hold page.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Fridolin Somers 2021-12-11 07:32:22 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 5 Kyle M Hall 2021-12-17 13:43:33 UTC
Pushed to 21.11.x for 21.11.01
Comment 6 Andrew Fuerste-Henry 2021-12-17 20:16:48 UTC
Pushed to 21.05.x for 21.05.08
Comment 7 Victor Grousset/tuxayo 2021-12-22 21:39:23 UTC
Not backported to oldoldstable (20.11.x). Feel free to ask if it's needed.