[Koha-bugs] [Bug 33690] Add ability to send welcome notice when creating patrons using the REST API

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Sep 8 14:51:20 CEST 2023


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

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

1. Enabled RESTBasicAuth system preference.

2. For step 3 of the test plan, header should now be x-koha-override.
   - If AutoEmailNewUser enabled, header not required
   - Use x-koha-override to override = welcome_yes or welcome_no
   - Should work with the various combinations:
     . AutoEmailNewUser enabled, no header required: welcome message sent
     . AutoEmailNewUser not enabled, x-koha-override = welcome_yes : welcome
message sent
     . AutoEmailNewUser enabled, x-koha-override = welcome_no : welcome message
not sent

3. Used Postman to create a new HTTP Request with these values/settings:
   - POST to http://127.0.0.1:8081/api/v1/patrons
   - Authorization: Basic Auth with koha as both username password
   - Headers: used without x-koha-override and AutoEmailNewUser enabled +
various combinations as in testing notes 2 above
   - Body (raw and JSON selected):
{
    "cardnumber": "987654321",
    "category_id": "PT",
    "library_id": "CPL",
    "email": "email at example.com",
    "surname": "bz33690",
    "userid": "bz33690"
}

4. Tests pass: prove -v t/db_dependent/api/v1/patrons.t

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


More information about the Koha-bugs mailing list