This was reported for Koha 3.12.09, but I couldn't find any bug report. So it's possible that's still the case in current versions of Koha: When a patron is created using LDAP, the message preferences configured for the patron category are not set for the patron. Patrons created manually or imported via CSV have the correct messaging settings. I would appreciate if someone on a newer version using LDAP could confirm if this is a problem there as well or not.
Looking at the code and with Martin's help I think adding this after the AddMember call in the LDAP code could solve the problem: C4::Members::Messaging::SetMessagingPreferencesFromDefaults( { borrowernumber => $borrower{'borrowernumber'}, categorycode => $borrower{'categorycode'} } ); Untested so far.
Created attachment 28409 [details] [review] BUG 12304: LDAP auto-provisioning set default messaging preferences LDAP auto-provisioning should set default messaging preferences upon creation of a user.
Comment on attachment 28409 [details] [review] BUG 12304: LDAP auto-provisioning set default messaging preferences This is awesome, thx Martin!
Created attachment 28417 [details] [review] BUG 12304: LDAP auto-provisioning set default messaging preferences LDAP auto-provisioning should set default messaging preferences upon creation of a user.
Manually applied to 3.12.9 and it works beautifully in test and production. Thanks Martin!
Created attachment 28855 [details] [review] [SIGNED OFF] BUG 12304: LDAP auto-provisioning set default messaging preferences LDAP auto-provisioning should set default messaging preferences upon creation of a user. Signed-off-by: Ulrich Kleiber <ulrich.kleiber@bsz-bw.de> Manually applied to 3.12.9 and it works beautifully in test and production.
Created attachment 28980 [details] [review] BUG 12304: LDAP auto-provisioning set default messaging preferences LDAP auto-provisioning should set default messaging preferences upon creation of a user. Signed-off-by: Ulrich Kleiber <ulrich.kleiber@bsz-bw.de> Manually applied to 3.12.9 and it works beautifully in test and production. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
This is also a problem in current master!
Created attachment 29114 [details] [review] [PASSED QA] BUG 12304: LDAP auto-provisioning set default messaging preferences LDAP auto-provisioning should set default messaging preferences upon creation of a user. Signed-off-by: Ulrich Kleiber <ulrich.kleiber@bsz-bw.de> Manually applied to 3.12.9 and it works beautifully in test and production. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Patch pushed to master. Thanks Martin!
Pushed to 3.16.x for inclusion in 3.16.2.