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)
committerAndrew Fuerste-Henry <andrew@bywatersolutions.com>
Mon, 7 Mar 2022 19:56:30 +0000 (19:56 +0000)
commit4dd61b0fc452da2d1a026acbb07955ce1286424d
treecc4c17f7cdf859288bb751d28c4d9bd9c9e44c4c
parentc07cee37bb4c771727d83864bf11b460b5eabe31
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: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f2d1b126b97ede8d67a3deee97c3a2dc44b334c8)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
C4/Reserves.pm
Koha/Hold.pm