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

--- Comment #2 from Andrew Fuerste-Henry <[email protected]> ---
Some testing complications to note here:

The Add Patron API call has a header option to tell it not to generate a
welcome notice at all. If you've imported the Koha API into Postman and its
generated default content for the body of your calls, it may have set this
header by default. Learn from my mistakes :)

bug 35635 splits patron attribute mandatory-ness for staff/opac into two
values. the API follows the staff mandatory values, so set your attribute to
mandatory for the staff interface when testing this.

Because the message_queue has a foreign key constraint to borrowers, if your
registration fails the notice will not save in the message_queue. That makes it
hard to confirm that it's generated if you're on a test system that doesn't
actually send email.

How to get KTD to send email:
https://gitlab.com/-/snippets/1893788#enabling-email-for-testing

If you don't set your system up to send email, you can still see that the
message_queue.message_id increments up for the WELCOME notice for the failed
patron.

Revised test plan:
1: set AutoEmailNewUser = "Send", confirm you have a WELCOME notice defined
2: create a patron attribute, check "Staff interface mandatory"
3: (optional but recommended) set up your test system up to send email via SMTP
following directions linked above
4: use Postman or similar to add a patron successfully -- send all required
borrower fields, an email address, and your required attribute
5: confirm you get a success message in Postman and your patron exists in koha
6: run report "select * from message_queue" and see your patron's WELCOME email
7: if you set up outgoing mail, confirm you received the WELCOME email
8: use Postman or similar to fail to add a patron -- send all required borrower
fields, an email address, and NOT your required attribute
9: confirm you get a failure message about a missing attribute in Postman and
your patron does not exist in Koha
10: run report "select * from message_queue" and see no change
11: if you set up outgoing mail, confirm you have just received a welcome email
for your patron who did NOT successfully register
12: repeat steps 4-6 -- successfully make a patron via API and re-run your
report. note that there are now 2 WELCOME emails in the message_queue and their
message_ids are non-sequential. They skip a number for the notice generated for
your failed patron

-- 
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/

Reply via email to