The default messaging preferences are no longer applied when self registering in OPAC. This seems be a regression caused by bug 30318. Implementing bug 34003 is a possible solution. Another possible solution is to render the default messaging preferences as hidden fields in the self registration form. A third alternative is to called C4::Members::Messaging::SetMessagingPreferencesFromDefaults at an opportune moment.
Created attachment 168920 [details] [review] Bug 37339: Set messaging preferences from default on self registration The change on bug 30318 prevented setting the default messaging preferences when none were passed. Self registration relied on this for setting borrower preferences from the defaults. This patch removes the call to handle_form_action and replaces it with a call to: SetMessagingPreferencesFromDefault To test: 1 - Ensure self registration is enabled 2 - Set default messaging preferences for the self registration category 3 - Self register a patron from the OPAC, confirm defaults not set 4 - Apply patch, restart all 5 - Self register a patron 6 - Confirm defaults have been set 7 - Enable PatronSelfRegistrationVerifyByEmail 8 - Self register a patron on OPAC with an email 9 - Find the email and grab the verification link (unless you have emails enabled) SELECT * FROM message_queue; 10 - Visit the link and confirm registration 11 - Confirm messaging defaults are set
Created attachment 168924 [details] [review] Bug 37339: Set messaging preferences from default on self registration The change on bug 30318 prevented setting the default messaging preferences when none were passed. Self registration relied on this for setting borrower preferences from the defaults. This patch removes the call to handle_form_action and replaces it with a call to: SetMessagingPreferencesFromDefault To test: 1 - Ensure self registration is enabled 2 - Set default messaging preferences for the self registration category 3 - Self register a patron from the OPAC, confirm defaults not set 4 - Apply patch, restart all 5 - Self register a patron 6 - Confirm defaults have been set 7 - Enable PatronSelfRegistrationVerifyByEmail 8 - Self register a patron on OPAC with an email 9 - Find the email and grab the verification link (unless you have emails enabled) SELECT * FROM message_queue; 10 - Visit the link and confirm registration 11 - Confirm messaging defaults are set Signed-off-by: David Nind <david@davidnind.com>
Created attachment 169098 [details] [review] Bug 37339: Set messaging preferences from default on self registration The change on bug 30318 prevented setting the default messaging preferences when none were passed. Self registration relied on this for setting borrower preferences from the defaults. This patch removes the call to handle_form_action and replaces it with a call to: SetMessagingPreferencesFromDefault To test: 1 - Ensure self registration is enabled 2 - Set default messaging preferences for the self registration category 3 - Self register a patron from the OPAC, confirm defaults not set 4 - Apply patch, restart all 5 - Self register a patron 6 - Confirm defaults have been set 7 - Enable PatronSelfRegistrationVerifyByEmail 8 - Self register a patron on OPAC with an email 9 - Find the email and grab the verification link (unless you have emails enabled) SELECT * FROM message_queue; 10 - Visit the link and confirm registration 11 - Confirm messaging defaults are set Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
All makes sense, no QA issues, no regressions. Passing QA
Just wondering: If we have: + C4::Members::Messaging::SetMessagingPreferencesFromDefaults Do we still need the use? +use C4::Members::Messaging qw( SetMessagingPreferencesFromDefaults );
Pushed for 24.11! Well done everyone, thank you!
Backported to 24.05.x for upcoming 24.05.05
Pushed to 23.11.x for 23.11.10