[Koha-bugs] [Bug 34731] C4::Letters::SendQueuedMessages can be triggered with an undef message_id

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Sep 8 22:05:23 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34731

David Nind <david at davidnind.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |david at davidnind.com

--- Comment #8 from David Nind <david at davidnind.com> ---
Testing notes (using KTD):

1. Set up KTD so that email can be sent - see [1].

2. Add an email address to the koha user for an account you can access.

3. Test that emails are queued:
   . Edit the koha user patron messaging preferences so that an email is sent
when an item is checked out.
   . Checkout an item to the koha user.
   . Note that under notices for the koha user that there is a Checkouts notice
with status of pending.
     OR
   . Check the message queue (koha-mysql kohadev + select * from
message_queue;) and note that the email status is pending.

4. Edit the CART notice so that the contents for email message is: [%- IF 0
%][% END %]

5. Add some records to the cart and send the cart to an email address.

6. You will receive a message about the checkout, even though the cronjob for
sending messages wasn't run (you can also check that in the notices tab for the
koha user that the checkouts notice is now showing as sent). In addition, you
won't receive a message with the cart details.

7. Apply the patch etc., and repeat steps 3 + 5: this time the checkouts notice
isn't sent - the status under notices for the koha user and in the database
message queue will stay as pending, and you won't have received the checkout
notice.

Note: Possibly don't need to set up email sending - probably possible to only
look at the notices tab for the koha user.


[1] To test sending emails using a Google account, edit
/etc/koha/sites/kohadev/koha-conf.xml and add this configuration near the end
(where <user_name> = your Google email address; <password> = your APP password,
not your Google account password), and then restart_all:

 <smtp_server>
    <host>smtp.gmail.com</host>
    <port>587</port>
    <timeout>5</timeout>
    <ssl_mode>STARTTLS</ssl_mode>
    <user_name>GOOGLEACCOUNTUSER</user_name>
    <password>GOOGLEAPPPASSWORD</password>
    <debug>1</debug>
 </smtp_server>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list