https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42809 --- Comment #8 from David Cook <dcook@prosentient.com.au> --- Created attachment 207015 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207015&action=edit Bug 42809: Fix messaging preference 'print' fallback This change fixes the conditions around the messaging preference 'print' fallback, so that the print fallback is only used if the user has (1) messaging preferences defined for this notice, and (2) the user does not have the metadata needed to fulfill *any* of the messaging prferences (ie 0 preferred notices could be generated) To reproduce: - Set SMSSendDriver syspref to Email - Using KTD, search for patron with cardnumber 42 - Go to the "Details" tab and "Edit" the "Patron messaging preferences" - For "Hold filled" tick both SMS and Email and click Save - Place a hold for the user - e.g. Search for biblionumber:"29" - Go to Holds - Put 42 in the search box - Hit "Search" button - Hit "Place hold" when the hold screen comes up - Check in the item for biblionumber 29 - e.g. On the top bar go to the "Check in" tab and enter 39999000001310, and press the arrow button - Click "Confirm hold(Y)" - In the patron record, go to "Notices" and note that thre's a print notice generated. This is to be expected since we don't have an email stored yet. - Now cancel the hold, add an email address (doesn't have to be real), and repeat the hold placed and hold filled process above - Note when there is an email address but no SMS number, we have both an "email" and a "print" notice generated. This is the bug! - Edit the user and remove the email address but add a SMS number - Now cancel the hold, and repeat the hold placed and hold filled process above - In the patron record, go to "Notices" and note that we have both a "print" and a "sms" notice generated. This is also the bug! - I'm not quite sure how sure how to check the itiva and phone notifications, but the above should be sufficient to illustrate the bug -- To test: - Apply the patch - restart_all - As per "To reproduce", cancel any holds for user with cardnumber 42 - With a SMS number but no email, repeat the process for placing and filling a hold outlined above - Check the user's notices and note that only a SMS notice is generated - Cancel the hold - Remove the SMS number and add an email address - Repeat the process for placing and filling a hold outlined above - Check the user's notices and note that only an email notice is generated - Cancel the hold - Remove the email address so there is no email address nor a SMS number - Repeat the process for placing and filling a hold outlined above - Check the user's notices and note that only a print notice is generated - Cancel the hold - Remove the messaging preferences for "SMS" and "Email" - Repeat the process for placing and filling a hold outlined above - Check the user's notices and note that no notice is generated - Cancel the hold -- You are receiving this mail because: You are watching all bug changes.