]> git.koha-community.org Git - koha.git/commit
Bug 29346: Biblio actions triggers
authorTomas Cohen Arazi <tomascohen@theke.io>
Wed, 23 Mar 2022 14:22:52 +0000 (11:22 -0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 5 May 2022 21:17:35 +0000 (11:17 -1000)
commita6d501ad8a9e7f58f7a1d782715f1e8bacab291d
treefb87bb40453e7d38b91fdae145c1ff932598a1c1
parent90b76521bf211d2986680c4e0dc35091b5ca6f87
Bug 29346: Biblio actions triggers

This patch adds the trigger for the holds queue update on teh following
methods:

- C4::Biblio::DelBiblio
- C4::Biblio::ModBiblio

The ModBiblio use case could be improved by checking if itemtype is one
of the updated attributes... but it felt there was no way to do it
without some overhead. So I leave it as-is.

It also mocks the ->enqueue method in the tests that call DelBiblio and
ModBiblio to avoid breakages [1]

Tests are added to check the trigger is called.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Biblio.t
=> SUCCESS: Tests pass! It means the trigger is triggered :-D
3. Sign off :-D

[1] This breakages could be avoided if we solve Koha/BackgrounJob.pm:101
FIXME.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
C4/Biblio.pm
t/db_dependent/Biblio.t