Bug 37055 - WaitingNotifyAtCheckout should only trigger on patrons with waiting holds
Summary: WaitingNotifyAtCheckout should only trigger on patrons with waiting holds
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Nick Clemens (kidclamp)
QA Contact: Matt Blenkinsop
URL:
Keywords:
: 37199 37239 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-06-07 16:26 UTC by Andrew Fuerste-Henry
Modified: 2024-10-09 19:50 UTC (History)
14 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00,24.05.05
Circulation function:


Attachments
Bug 37055: Check count of holds, not if defined (1.81 KB, patch)
2024-06-14 18:03 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 37055: Check count of holds, not if defined (1.86 KB, patch)
2024-06-21 18:26 UTC, Brendan Lawlor
Details | Diff | Splinter Review
Bug 37055: Check count of holds, not if defined (1.94 KB, patch)
2024-07-02 13:03 UTC, Matt Blenkinsop
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Fuerste-Henry 2024-06-07 16:26:51 UTC
When one patron has a waiting hold, Koha pops up a modal when checking out to any patrons.

To recreate:
 - enable WaitingNotifyAtCheckout
 - have or create a waiting hold for a patron
 - check out an item to a different patron who does not have a waiting hold
 - Koha says "This patron has waiting holds that are available for checkout"
Comment 1 Nick Clemens (kidclamp) 2024-06-14 18:03:32 UTC
Created attachment 167758 [details] [review]
Bug 37055: Check count of holds, not if defined

To test:
 - enable WaitingNotifyAtCheckout
 - have or create a waiting hold for a patron
 - check out an item to a different patron who does not have a waiting hold
 - Koha says "This patron has waiting holds that are available for checkout"
 - Apply patch
 - Reload patron (click 'Checkout' tab)
 - Check out an item - no warning
 - Find the patron with waiting hold
 - Check out an item - warning
 - Checkout the waiting item - no warning
Comment 2 David Nind 2024-06-15 06:03:19 UTC
Everything works as per the test plan.

However, WaitingNotifyAtCheckout no longer seems to work for me as it is supposed to for a patron that actually has holds:
1. Place a hold for a patron (I changed Mary to the Centerville library, and paced a hold for record with an item in Centerville)
2. For the same patron, check out another item to them (I checked out an item based at Centerville).
3. The message saying waiting holds available DOESN'T appear.
Comment 3 Nick Clemens (kidclamp) 2024-06-18 17:38:33 UTC
I retested and everything seems to work as expected David. I did find one time where the warning didn't appear, but that was because I had pulled up the patron's account before marking the hold waiting. I checked in the item and confirmed the hold on another tab, and had not reloaded the patron. 

The way the preference works, it sends the waiting holds to the page, and then at checkout time, before the new barcode is submitted, we check to see if there are waiting holds that don't match the current barcode.

This means if the item is marked waiting after loading the patron's checkout page they won't be warned.

Can you retest, making sure to refresh the checkout page before checking out an item?
Comment 4 Brendan Lawlor 2024-06-21 18:26:32 UTC
Created attachment 167980 [details] [review]
Bug 37055: Check count of holds, not if defined

To test:
 - enable WaitingNotifyAtCheckout
 - have or create a waiting hold for a patron
 - check out an item to a different patron who does not have a waiting hold
 - Koha says "This patron has waiting holds that are available for checkout"
 - Apply patch
 - Reload patron (click 'Checkout' tab)
 - Check out an item - no warning
 - Find the patron with waiting hold
 - Check out an item - warning
 - Checkout the waiting item - no warning

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Comment 5 David Nind 2024-06-27 00:58:23 UTC
*** Bug 37199 has been marked as a duplicate of this bug. ***
Comment 6 Matt Blenkinsop 2024-07-02 11:21:06 UTC
I can't get the test plan to pass. I'm creating the waiting hold by placing a hold on an item and manually setting "found" to be "W" in the database but the final stage of the test plan is failing when I try to check out the waiting item - I still get a warning.

This could just be me not understanding the test plan properly, anything I might be missing?
Comment 7 Katrin Fischer 2024-07-02 12:49:05 UTC
Hm, why manually updating the found status? I wonder if you are missing some data then, like the waiting date etc. Maybe try to check it in for setting the correct status?
Comment 8 Matt Blenkinsop 2024-07-02 13:03:41 UTC
Created attachment 168364 [details] [review]
Bug 37055: Check count of holds, not if defined

To test:
 - enable WaitingNotifyAtCheckout
 - have or create a waiting hold for a patron
 - check out an item to a different patron who does not have a waiting hold
 - Koha says "This patron has waiting holds that are available for checkout"
 - Apply patch
 - Reload patron (click 'Checkout' tab)
 - Check out an item - no warning
 - Find the patron with waiting hold
 - Check out an item - warning
 - Checkout the waiting item - no warning

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Comment 9 Matt Blenkinsop 2024-07-02 13:04:20 UTC
Turns out I just don't know how Koha works! Test plan now succeeds and QA tests are all good
Comment 10 Katrin Fischer 2024-07-02 15:22:18 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 11 Phil Ringnalda 2024-07-02 23:36:11 UTC
*** Bug 37239 has been marked as a duplicate of this bug. ***
Comment 12 Catrina Berka 2024-10-03 18:48:02 UTC
Any chance of a backport to 24.05?
Comment 13 Lucas Gass (lukeg) 2024-10-09 19:50:26 UTC
Backported to 24.05.x for upcoming 24.05.05