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 Bug 11998: Do not clear syspref cache in psgi file 2016-03-15 07:08:29 +00:00
bin Revert Bug 11081 - Port Koha::Contrib::Tamil indexer into Koha code base 2016-03-01 16:56:35 +00:00
cronjobs Bug 19750: Overdues without a fine rule add warnings to log 2018-02-02 12:08:34 -03:00
devel Bug 14826: Add account offset type table 2017-10-20 17:14:32 -03:00
interface_customization Bug 18739 - Add SVG version of staff-home-icons-sprite image 2017-09-19 11:47:32 -03:00
load_testing Bug 17829: Move GetMember to Koha::Patron 2017-07-10 13:14:19 -03:00
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 Bug 16520: Allow per-VirtualHost environment variables with Plack 2016-10-11 12:49:42 +00:00
release_notes Add release notes for Koha 17.11 2017-11-28 14:52:13 -03:00
search_tools Bug 17372: Standardize Elasticsearch paths 2016-10-11 01:07:03 +00:00
translator Translation updates for Koha 17.11.00 2017-11-27 14:24:06 -03:00
batchCompareMARCvsFrameworks.pl
batchdeletebiblios.pl Bug 8674 follow-up Fix perlcritic error 2012-10-02 17:48:03 +02:00
batchDeleteUnusedSubfields.pl
batchImportMARCWithBiblionumbers.pl Bug 8576: Software error on authority edition when using merge 2012-08-28 17:55:33 +02:00
batchRebuildBiblioTables.pl Bug 19040: Refactor GetMarcBiblio parameters 2017-08-25 10:23:42 -03:00
batchRebuildItemsTables.pl Bug 19040: Refactor GetMarcBiblio parameters 2017-08-25 10:23:42 -03:00
batchRepairMissingBiblionumbers.pl Bug 19040: Refactor GetMarcBiblio parameters 2017-08-25 10:23:42 -03:00
check_sysprefs.pl
commit_file.pl Bug 7131: (follow-up) update the command-line import tools 2013-10-30 04:35:17 +00:00
export_borrowers.pl Bug 17829: Move GetMember to Koha::Patron 2017-07-10 13:14:19 -03:00
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 Bug 18920: Save DB_USE_TLS and FONT_DIR to install log 2017-10-27 16:07:15 -03:00
kohalib.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
link_bibs_to_authorities.pl Bug 19040: Refactor GetMarcBiblio parameters 2017-08-25 10:23:42 -03:00
mod_zebraqueue.pl Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
perlmodule_ls.pl
perlmodule_rm.pl
recreateIssueStatistics.pl
sax_parser_print.pl Bug 17626 (QA followup) 2016-11-22 11:29:07 +00:00
sax_parser_test.pl
sip_cli_emulator.pl Bug 16757 - Add support for Fee Paid to SIP cli emulator for testing 2017-03-31 13:56:37 +00:00
stage_file.pl Bug 19049: Fix regression on stage-marc-import with to_marc plugin 2017-08-15 12:17:41 -03:00