Bugzilla – Attachment 131102 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.07 KB, created by
Tomás Cohen Arazi (tcohen)
on 2022-02-25 08:57:29 UTC
(
hide
)
Description:
Bug 30180: Add 'placed' after_hold_hook
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2022-02-25 08:57:29 UTC
Size:
1.07 KB
patch
obsolete
>From d2d892bfb64b1be9bd5993bd5244028fa0f49ed1 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> >--- > C4/Reserves.pm | 7 +++++++ > 1 file changed, 7 insertions(+) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 6e86857db8..d5d73af7b7 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -305,6 +305,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.35.1
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