Bug 37199

Summary: Incorrect "waiting holds" notification for staff
Product: Koha Reporter: Slava Shishkin <slavashishkin>
Component: CirculationAssignee: Bugs List <koha-bugs>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: david, gmcharlt, kyle.m.hall
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34668
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 34668    
Bug Blocks:    
Attachments: Bug 37199: Incorrect "waiting holds" notification for staff

Description Slava Shishkin 2024-06-26 14:53:46 UTC
There is an issue with the "WaitingNotifyAtCheckout" system preference, where staff receive incorrect "This patron has waiting holds" pop-up notifications for users during checkout.

Steps to reproduce:
1. Set the system preference "WaitingNotifyAtCheckout" to "Notify".
2. Place a hold on one of the available items for patron (A).
3. Check out another available item from the same bibliographic record to patron (B).
4. Verify that staff receive a pop-up notification "This patron has waiting holds", even if patron (B) has no holds from the same bibliographic record.
Comment 1 Slava Shishkin 2024-06-26 14:56:10 UTC
Created attachment 168154 [details] [review]
Bug 37199: Incorrect "waiting holds" notification for staff

- Modified `circ/circulation.pl` to ensure the `waiting_holds` search results are correctly processed using `as_list`. Previously, the search results were passed as an object, which always evaluated to true. By converting the search results to a list, we ensure proper handling and checking of waiting holds.

Test Plan:
1. Apply the patch.
2. Set the system preference "WaitingNotifyAtCheckout" to "Notify".
3. Place a hold on one of the available items for a patron (A).
4. Check out another available item from the same bibliographic record to a patron (B).
5. Verify that staff do not receive the incorrect notification when checking out items to patron (B).
6. Ensure the functionality works as expected when checking out items to patron (A).
Comment 2 David Nind 2024-06-27 00:58:23 UTC
Thanks for adding this bug to report this issue, and adding a patch!

It looks like this is a duplicate of bug 37055, which is signed off and waiting for quality assurance review.

I've marked your bug as a duplicate.

Thanks again.

David Nind

*** This bug has been marked as a duplicate of bug 37055 ***