Bug 33690: Add ability to send welcome notice when creating patrons using the REST API
authorKyle M Hall <kyle@bywatersolutions.com>
Fri, 5 May 2023 16:22:53 +0000 (12:22 -0400)
committerTomas Cohen Arazi <tomascohen@theke.io>
Wed, 4 Oct 2023 15:07:55 +0000 (11:07 -0400)
commit79a5509b775095643952f94028d62ba978515cfb
tree650c252126079c6b4887cf2c025b04d58a4c739c
parentc914473e811d6670a7195b11dc09cddc08182c24
Bug 33690: Add ability to send welcome notice when creating patrons using the REST API

It would be nice to have the ability to send a welcome notice when creating patrons via the API.

Test Plan:
1) Apply this patch
2) Ensure you have a WELCOME notice
3) Create a new patron using the REST API ( api/v1/patrons )
4) Note no welcome notice is sent to the patron ( you can check the
   notices tab for the patron )
5) Repeat step 3, but send the header X-Koha-SendWelcomeEmail with a
   value of 1 as part of the POST
6) Note the welcome message for the patron is in their notices!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 33690: Tidy test

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/REST/V1/Patrons.pm
api/v1/swagger/paths/patrons.yaml
t/db_dependent/api/v1/patrons.t