Bug 30727: Avoid holds queue updates multiple times on BatchDeleteBiblio
authorTomas Cohen Arazi <tomascohen@theke.io>
Tue, 10 May 2022 15:27:02 +0000 (12:27 -0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 13 May 2022 08:17:45 +0000 (22:17 -1000)
commita3ac2a20ddf882802639013b6cef38f1786df880
treeba1e57abb523570796c4f51e9da3a82e475c9c66
parentc4df2457ded7b2f903085c23e09fe87969730444
Bug 30727: Avoid holds queue updates multiple times on BatchDeleteBiblio

This patch makes the background job only enqueue holds queue updates
once per biblio, when appropriate.

To test:
1. Apply the regression tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/BackgroundJobs/BatchDeleteBiblio.t
=> FAIL: It enqueues 3 times for a bib!
3. Apply this patch
4. Repeat 2
=> SUCCESS: It only enqueues once!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Koha/BackgroundJob/BatchDeleteBiblio.pm