]> git.koha-community.org Git - koha.git/commit
Bug 17499: (follow-up) Contact information vs. mtt validation
authorLari Taskula <lari.taskula@hypernova.fi>
Wed, 18 Nov 2020 02:15:23 +0000 (02:15 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 12 Sep 2023 13:16:11 +0000 (10:16 -0300)
commitf139509818fa5a317ebc4e63791698680d460b3f
treeee62342b8368944d34ab41bf7043821a949a63a5
parentea9dbf6a81e3f9b36b4b9025fd35c806c78eb915
Bug 17499: (follow-up) Contact information vs. mtt validation

This patch adds a subroutine that handles message transport type validation by
first checking related patron contact information.

As an example, if there is no email address, we shouldn't let email be selected
as a messaging transport type.

The reason to isolate logic into a separate subroutine is that C4/Reserves.pm
_koha_notify_reserve() also uses the same logic and we should not duplicate it.
C4::Reserves::_koha_notify_reserve() will be adjusted to use this new sub in
Bug 18595.

To test:
1. prove t/db_dependent/Koha/Patron/Message/Preferences.t

Sponsored-by: The National Library of Finland
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/Patron/Message/Preference.pm
t/db_dependent/Koha/Patron/Message/Preferences.t