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: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
                CC: [email protected], [email protected]

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":"[email protected]"}

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.
_______________________________________________
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