Bug 32247: Exit holds queue builder if there are no holds on the biblio
authorNick Clemens <nick@bywatersolutions.com>
Thu, 17 Nov 2022 13:38:58 +0000 (13:38 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Thu, 19 Jan 2023 23:16:00 +0000 (23:16 +0000)
commit240aeb9d0d0901b94e2d135bb5c8515c8287fb67
tree7b4be35be64b7046d0025afb4d2ae9de2a0fb152
parentfc980aed316439549d5ad1ad09183d8a40fdcde3
Bug 32247: Exit holds queue builder if there are no holds on the biblio

update_queue_for_biblio currently
1 - gets the holds on a bib
2 - gets the items available to fill any holds
3 - combines these to build the queue, exiting if there are no holds or items

If there are no holds at step 1, we don't need to do step 2 or 3
This patch simply deletes the queue for this biblio, then exits if there are no holds

To test:
prove -v t/db_dependent/Reserves.t t/db_dependent/Koha/Item.t t/db_dependent/Koha/Hold.t t/db_dependent/Koha/BackgroundJobs/BatchDeleteItem.t t/db_dependent/Koha/BackgroundJobs/BatchDeleteBiblio.t t/db_dependent/HoldsQueue.t t/db_dependent/Circulation_holdsqueue.t t/db_dependent/Biblio_holdsqueue.t t/db_dependent/Biblio.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7502f520a4fbb71fc63e76307d1ad67f059dd213)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d71eceba98866a99a6860f65fcd90ae6c23207cf)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
C4/HoldsQueue.pm