Bugzilla – Attachment 133416 Details for
Bug 30180
Deprecate after_hold_create hook
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30180: Add 'placed' after_hold_hook
Bug-30180-Add-placed-afterholdhook.patch (text/plain), 1.12 KB, created by
David Nind
on 2022-04-19 19:42:43 UTC
(
hide
)
Description:
Bug 30180: Add 'placed' after_hold_hook
Filename:
MIME Type:
Creator:
David Nind
Created:
2022-04-19 19:42:43 UTC
Size:
1.12 KB
patch
obsolete
>From 3b8c978c1040c8e1ad065b7f5b83cef34b3ce31f Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 25 Feb 2022 05:50:20 -0300 >Subject: [PATCH] Bug 30180: Add 'placed' after_hold_hook > >This patch adds a new 'after_hold_action' hook, that is called with the >'placed' action parameter. > >To test: >1. Apply the unit tests patch >2. Run: > $ kshell > k$ prove t/db_dependent/Koha/Plugins/Holds_hooks.t >=> FAIL: Boo, the hook is not called >3. Apply this patch >4. Repeat 2 >=> SUCCESS: Tests pass! >5. Sign off :-D > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: David Nind <david@davidnind.com> >--- > C4/Reserves.pm | 7 +++++++ > 1 file changed, 7 insertions(+) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index d291a888e6..d6121a7616 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -306,6 +306,13 @@ sub AddReserve { > } > > Koha::Plugins->call('after_hold_create', $hold); >+ Koha::Plugins->call( >+ 'after_hold_action', >+ { >+ action => 'place', >+ payload => { hold => $hold->get_from_storage } >+ } >+ ); > > return $reserve_id; > } >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30180
:
131101
|
131102
|
131103
|
133415
|
133416
|
133417
|
133818
|
133819
|
133820