Bugzilla – Attachment 132300 Details for
Bug 22993
Messaging preferences not set for patrons imported through API
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[20.11] Bug 22993: Handle default messaging preferences during patron creation through API
2011-Bug-22993-Handle-default-messaging-preference.patch (text/plain), 1.16 KB, created by
Katrin Fischer
on 2022-03-28 09:29:43 UTC
(
hide
)
Description:
[20.11] Bug 22993: Handle default messaging preferences during patron creation through API
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2022-03-28 09:29:43 UTC
Size:
1.16 KB
patch
obsolete
>From cbf6a3961e7278902d409acaf2ef590049c4d757 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer@bsz-bw.de> >Date: Wed, 23 Mar 2022 11:30:54 +0100 >Subject: [PATCH] [20.11] Bug 22993: Handle default messaging preferences > during patron creation through API > >Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> >--- > Koha/REST/V1/Patrons.pm | 9 +++++++++ > 1 file changed, 9 insertions(+) > >diff --git a/Koha/REST/V1/Patrons.pm b/Koha/REST/V1/Patrons.pm >index abefe227a5..8f719bc3a8 100644 >--- a/Koha/REST/V1/Patrons.pm >+++ b/Koha/REST/V1/Patrons.pm >@@ -136,6 +136,15 @@ sub add { > > my $patron = Koha::Patron->new_from_api( $c->validation->param('body') )->store; > >+ if ( C4::Context->preference('EnhancedMessagingPreferences') ) { >+ C4::Members::Messaging::SetMessagingPreferencesFromDefaults( >+ { >+ borrowernumber => $patron->borrowernumber, >+ categorycode => $patron->categorycode, >+ } >+ ); >+ } >+ > $c->res->headers->location( $c->req->url->to_string . '/' . $patron->borrowernumber ); > return $c->render( > status => 201, >-- >2.11.0
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 22993
:
131131
|
131132
|
131358
|
131359
|
131361
|
131362
| 132300