Bug 19451: Add no_overwrite option to borrowers-force-messaging-defaults.pl
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Thu, 12 Oct 2017 10:19:11 +0000 (12:19 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 12 Feb 2018 21:01:59 +0000 (18:01 -0300)
commitbd4992749b75f2d8e57fe3ddce1eb9ff4b004fe1
treea330f9b0bb8a30100532d080eb2043c8b748f2cf
parent8070357a4070cbcfb6f854fa421b48482b1c0ab4
Bug 19451: Add no_overwrite option to borrowers-force-messaging-defaults.pl

This option allows you to add preferences only when they are not yet
present. In other words: skip patrons that already set their prefs.

Test plan:
[1] Delete all borrower messaging prefs for a patron.
[2] Run borrowers-force-messaging-defaults.pl -no-overwrite -doit
    Verify that the patron now has default msg preferences.
[3] Change his settings and make them non-default.
    For instance, increase days in advance.
[4] Run borrowers-force-messaging-defaults.pl -no-overwrite -doit
    Verify that the patron still has the non-default settings.
[5] Run borrowers-force-messaging-defaults.pl -doit
    Verify that the patron msg prefs have been overwritten.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
misc/maintenance/borrowers-force-messaging-defaults.pl