Bugzilla – Attachment 131359 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]
Bug 22993: Handle default messaging preferences during patron creation from API
Bug-22993-Handle-default-messaging-preferences-dur.patch (text/plain), 1.50 KB, created by
Kyle M Hall (khall)
on 2022-03-03 19:35:09 UTC
(
hide
)
Description:
Bug 22993: Handle default messaging preferences during patron creation from API
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2022-03-03 19:35:09 UTC
Size:
1.50 KB
patch
obsolete
>From c631198ad346261df45f724cdfacf685bc70fe21 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 25 Feb 2022 20:04:41 +0000 >Subject: [PATCH] Bug 22993: Handle default messaging preferences during patron > creation from API > >TO test: >1 - Set default messaging preferences for a patron category >2 - Create a patron in that category using the API >3 - Verify messaging preferences are not set >4 - Apply patch, restart all >5 - Create another patron >6 - Verify messaging preferences are correctly set >7 - prove -v t/db_dependent/api/v1/patrons.t > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > Koha/REST/V1/Patrons.pm | 8 ++++++++ > 1 file changed, 8 insertions(+) > >diff --git a/Koha/REST/V1/Patrons.pm b/Koha/REST/V1/Patrons.pm >index 43cc666e81..576e4f8f2c 100644 >--- a/Koha/REST/V1/Patrons.pm >+++ b/Koha/REST/V1/Patrons.pm >@@ -119,6 +119,14 @@ sub add { > @$extended_attributes > ] > ); >+ 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( >-- >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 22993
:
131131
|
131132
|
131358
|
131359
|
131361
|
131362
|
132300