Bug 41733 - Honor EmailPatronRegistrations preference in the API
Summary: Honor EmailPatronRegistrations preference in the API
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: REST API (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Nick Clemens (kidclamp)
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-01-29 15:30 UTC by Nick Clemens (kidclamp)
Modified: 2026-01-29 15:36 UTC (History)
1 user (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 41733: Unit tests (6.89 KB, patch)
2026-01-29 15:36 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 41733: Honor EmailPatronRegistrations in the API (3.64 KB, patch)
2026-01-29 15:36 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2026-01-29 15:30:25 UTC
Bug 23538 added the ability to have the library receive an email when a patron registers.

Some outside systems, e.g. Aspen, use the patron API to register new patrons.

AutoEmailNewUser is handled in the API and EmailPatronRegistrations should be too.
Comment 1 Nick Clemens (kidclamp) 2026-01-29 15:36:02 UTC
Created attachment 192150 [details] [review]
Bug 41733: Unit tests
Comment 2 Nick Clemens (kidclamp) 2026-01-29 15:36:05 UTC
Created attachment 192151 [details] [review]
Bug 41733: Honor EmailPatronRegistrations in the API

This patch adds new overrides opac_reg_yes and opac_reg_no to the patrons api
and will send a notice to the library when a patron is registered via the API if the pref is
active and the NO override is not sent, or the YES override is sent

To test:
1 - Apply patches
2 - yarn build
3 - restart_all
4 - run unit tests