https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39408 Bug ID: 39408 Summary: Cannot add patron via API if AutoEmailNewUser and WELCOME content blank Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Some libraries use Template Toolkit logic to avoid sending emails. In the case of the welcome notice they may only want to send for patrons fully added, not self registered. In the case of Aspen, we currently use the patrons API for self registration as there is not a self registration API. If you add logic like: [% USE Koha %] [% IF borrower.categorycode != 'SELFREG' %] Hello [% borrower.title %] [% borrower.firstname %] [% borrower.surname %].<br> <br> Thank you for joining [% IF Koha.Preference('LibraryName') %][% Koha.Preference('LibraryName') %][% ELSE %]the library[% END %]<br> <br> You can search for all our materials in our <a href='[% Koha.Preference('OPACBaseURL') %]'>catalog</a>.<br> <br> Your library card number is [% borrower.cardnumber %]<br> <br> If you have any problems or questions regarding your account, please contact the library. [% END %] Then add a patron via the API in the self reg class: {"surname":"PATRON","firstname":"PROBLEM","library_id":"CPL","category_id":"SELFREG","email":"eample@example.org"} You get an error response: "Given does not exist" -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.