Koha/misc
Marcel de Rooy 58b5c925cc Bug 19452: Remove the truncate option
The truncate option is not really useful. Its result is probably not what
most users of this script expect or need.
It truncates both tables borrower_message_preferences and
borrower_message_transport_preferences. This (unfortunately) includes
deleting messaging preferences for patron categories. After that, adding
preferences again will not add categories again, but only borrower
preferences which are all disabled.

Furthermore, we do not need to disable the foreign key check. Neither
do we actually need to truncate, deleting records seems sufficient.
Also deleting transport preferences is not needed, since it will be
done by a cascade from messaging preferences. Note that the subsequent
call of SetMessagingPreferencesFromDefaults will already delete the
records.

This makes it possible to remove the truncate option altogether.

Test plan:
[1] Select a patron category (say ST) and change days_in_advance to x.
[2] Select a ST patron and set days_advance to y in his msg prefs.
[3] Run borrowers-force-messaging-defaults.pl -doit
[4] Verify that the patron has been reset to the default prefs (incl.
    value x in days_in_advance).
[5] Verify that the patron category prefs are still intact.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-18 14:48:25 -03:00
..
admin
bin
cronjobs Bug 19750: Overdues without a fine rule add warnings to log 2018-02-02 12:08:34 -03:00
devel
interface_customization
load_testing
maintenance Bug 19452: Remove the truncate option 2018-02-18 14:48:25 -03:00
migration_tools Bug 13660: Exclude export phase and use existing exported MARCXML - rebuild_zebra_sliced.sh 2018-01-09 17:23:50 -03:00
plack
release_notes
search_tools
translator
batchCompareMARCvsFrameworks.pl
batchdeletebiblios.pl
batchDeleteUnusedSubfields.pl
batchImportMARCWithBiblionumbers.pl
batchRebuildBiblioTables.pl
batchRebuildItemsTables.pl
batchRepairMissingBiblionumbers.pl
check_sysprefs.pl
commit_file.pl
export_borrowers.pl
export_records.pl Bug 19730: (follow-up bug 17196) Use biblio_metadata.timestamp in export_records.pl 2018-02-02 12:08:42 -03:00
exportauth.pl
import_patrons.pl Bug 12598: Fix POD 2018-02-16 14:05:18 -03:00
koha-install-log
kohalib.pl
link_bibs_to_authorities.pl
mod_zebraqueue.pl
perlmodule_ls.pl
perlmodule_rm.pl
recreateIssueStatistics.pl
sax_parser_print.pl
sax_parser_test.pl
sip_cli_emulator.pl
stage_file.pl