https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30300
--- Comment #39 from Caroline Cyr La Rose <[email protected]> --- We started updating our clients to 25.05 this week. We're getting cron errors because patrons who don't have emails now have the email preference checked in their file. I'm not fluent enough in perl to modify the database update to ignore the patrons who don't have emails in their account, but I think that would be the best option. Somewhere here, I guess? my $days_notice = C4::Context->preference('MembershipExpiryDaysNotice'); if ($days_notice) { $dbh->do( q{ INSERT IGNORE INTO borrower_message_preferences (`borrower_message_preference_id`, `borrowernumber`, `categorycode`, `message_attribute_id`, `days_in_advance`, `wants_digest`) SELECT NULL, borrowernumber, NULL, ?, NULL, NULL FROM borrowers }, {}, $message_attribute_id ); $dbh->do( q{ INSERT IGNORE INTO borrower_message_transport_preferences (`borrower_message_preference_id`, `message_transport_type`) SELECT borrower_message_preference_id, 'email' FROM borrower_message_preferences WHERE message_attribute_id = ? }, {}, $message_attribute_id ); say_success( $out, "'Patron expiry' notification activated in patron accounts" ); Right now I did this in a test db and it removed the preference for 14000+ patrons who did not have any email addresses in their account (I have yet to do it in production) delete from borrower_message_preferences where borrower_message_preference_id in (select borrower_message_preference_id from borrower_message_preferences left join borrowers using (borrowernumber) where message_attribute_id = 14 and (email is null or email = '') and (emailpro is null or emailpro = '') and (B_email is null or B_email = '')); -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
