Bug 30072: Add missing hold actions plugin hooks
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 11 Feb 2022 18:28:31 +0000 (15:28 -0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 4 Mar 2022 02:11:49 +0000 (16:11 -1000)
commitf832efe548f3202518f92334f6e6e6d313673aec
treee8751e9ed4e2ceea91779fa99942b07ea5e29f83
parentf51868cb821c09f848f2a404d57ab444cab00930
Bug 30072: Add missing hold actions plugin hooks

This patch introduces the after_hold_action plugin hook, with 4
different 'action' parameters:

- fill
- cancel
- suspend
- resume

To test:
1. Apply the unit tests
2. Run:
   $ kshell
  k$ t/db_dependent/Koha/Plugins/Holds_hooks.t -v
=> FAIL: The hooks are not in the code, so the expected output from the
Koha::Plugin::Test plugin is not there, and the tests fail
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Note: I think we could deprecate 'after_hold_create' and migrate it to
the one introduced here, using the 'place' action.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Koha/Hold.pm