[Koha-bugs] [Bug 29346] Add real-time holds queue update option

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Mar 23 20:36:15 CET 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29346

--- Comment #12 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Created attachment 132080
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=132080&action=edit
Bug 29346: Hold actions triggers

This patch makes several holds related actions schedule the background
job for real-time update of the holds queue.

This actions are:

- place (C4::Reserves::AddReserve)
- fill (Koha::Hold->fill)
- cancel (Koha::Hold->cancel)
- suspend (Koha::Hold->suspend)
- resume (Koha::Hold->resume)

The cancel() action is added a *skip_holds_queue* parameter to skip
triggering the background job entirely. It targets cases like
C4::Biblio::DelBiblio in which all biblio holds are cancelled in a loop.
In that case, we just want to cancel them and let a single backgroung
job take care of the holds queue, once the biblio is deleted.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Hold.t \
           t/db_dependent/Reserves.t
=> SUCCESS: Tests pass! Triggers are triggered
3. Sign off :-D

Sponsored-by: Montgomery County Public Libraries

holds

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list