Bugzilla – Attachment 165359 Details for
Bug 30318
Cannot override default patron messaging preferences when creating a patron in staff interface
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30318: Don't reset messaging preferences when form is empty
Bug-30318-Dont-reset-messaging-preferences-when-fo.patch (text/plain), 2.26 KB, created by
Martin Renvoize (ashimema)
on 2024-04-23 08:57:28 UTC
(
hide
)
Description:
Bug 30318: Don't reset messaging preferences when form is empty
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-04-23 08:57:28 UTC
Size:
2.26 KB
patch
obsolete
>From df8a6c05626c3311bb04f1b94328a1063b81627a Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 19 Apr 2024 12:29:31 +0000 >Subject: [PATCH] Bug 30318: Don't reset messaging preferences when form is > empty > >In testing, the messaging preferences are set in the form when EnhancedMessagingPreferences is enabled. >Switching categories silently updates the preferences unless you have made changes, in which case the >user is warned and can confirm if they want to reset or not. The code only applies to patron creatoin, and >does not seem to be taken into account during OPAC self-registration. > >It seems the silent defaulting when saving can be removed in favor of the current updates/warns in the actual >form. > >To test: > 1 - Set some messaging preferences for at least two categories > 2 - Enter a new patron > 3 - Confirm switching categories correctly defaults the messaging preferences > 4 - Edit the preferences and switch to another category with defaults > 5 - Confirm the warning appears, and preferences are set if confirmed and ignored if not > 6 - Set to a category with defaults, uncheck all, and save > 7 - Ooof, patron is defaulted > 8 - Apply patch > 9 - Repeat 1-5 and confirm nothing has changed >10 - Set to a category with defaults, uncheck all, save >11 - Confirm patron is saved with no preferences > >Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/Form/MessagingPreferences.pm | 9 --------- > 1 file changed, 9 deletions(-) > >diff --git a/C4/Form/MessagingPreferences.pm b/C4/Form/MessagingPreferences.pm >index dbac3aceb21..1322c6e2604 100644 >--- a/C4/Form/MessagingPreferences.pm >+++ b/C4/Form/MessagingPreferences.pm >@@ -96,15 +96,6 @@ sub handle_form_action { > } > > C4::Members::Messaging::SetMessagingPreference( $updater ); >- >- if ($query->param( $option->{'message_attribute_id'})){ >- $prefs_set = 1; >- } >- } >- if (! $prefs_set && $insert){ >- # this is new borrower, and we have no preferences set, use the defaults >- $target_params->{categorycode} = $categorycode; >- C4::Members::Messaging::SetMessagingPreferencesFromDefaults( $target_params ); > } > # show the success message > $template->param( settings_updated => 1 ); >-- >2.44.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 30318
:
165170
|
165217
| 165359