Koha-clms/misc/maintenance
Marcel de Rooy aa4fde7d0d Bug 9998: new tool to import/export and compare system preferences
This patch adds a new maintenance script: cmp_sysprefs.pl

Test plan:
1 Run with -cmd backup -file zz01. Check that file.
  Run with -cmd test -file zz01. Check zz01.sav.
2 Run with -cmd compare -file zz01. No differences expected.
3 Edit zz01: delete two prefs, change two prefs and add two new prefs.
4 Run with -cmd compare -file zz01. Are all six changes reported?
5 Add local use preference zz02 in the staff client (no explanation, options).
6 Run with -cmd backup -file zz02.
7 Delete local use pref zz02 from the staff client.
8 Run with -cmd restore -file zz02. Check if local pref zz02 came back.
9 Delete local use pref zz02 again from the staff client.
10 Run with -cmd compare -file zz02 -add. Check if local pref zz02 came back.
11 Change the value of zz02 in the staff client.
12 Run with -cmd compare -file zz02 -add. Check the value: not updated?
13 Run with -cmd compare -file zz02 -upd. Check the value: updated now?
14 Edit file zz02. Add a comment line and delete the line for pref zz02.
15 Run with -cmd compare -file zz02 -del. Is pref zz02 deleted?
16 Add local use preference zz02 in the staff client (WITH explanation).
17 Run with -cmd compare -file zz02 -del. pref zz02 should not be deleted.
18 Run with -cmd compare -file zz02 -del -ign-opt. zz02 should be deleted now.

Do the next steps only on a restorable test db:
19 Create file zz03. Leave it empty.
   Compare with: -cmd compare -file zz03 -del -ign-opt.
   All prefs gone except Version?
20 Restore with: -cmd restore -file zz01.sav.
   Compare with -cmd compare -file zz01.sav. Nothing reported?
   Note: The explanation or options are not recovered. (See also BZ 10199.)
   This affects local use preferences only.
   If you need them, restore your test db. Remove the zz files.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Amended patch
Only cosmetic stuff:
Perltidied with xt/perltidyrc.
Replaced most double quotes by single quotes around SQL statements.
Moved the usage into POD for pod2usage.
Passing no file shows help screen too.
Counting the db updates more accurately with return value of do.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-02 07:08:05 -07:00
..
MARC21_utf8_flag_fix.pl Fix FSF address in directory misc/ 2010-03-16 20:17:54 -04:00
UNIMARC_fix_collectiontitle.pl 3040 : seriestitle mistaken as collection title 2009-04-06 09:53:16 -05:00
UNIMARC_sync_date_created_with_marc_biblio.pl Bug 8844: UNIMARC_sync_date_created_with_marc_biblio.pl creates a modification log 2012-11-20 07:43:24 -05:00
borrowers-force-messaging-defaults Bug 5610: Add --since for setting messaging to default 2011-03-21 21:07:09 +13:00
check_sysprefs.sh Bug 8353 follow-up adding a tiny sh in misc/maintenance 2012-07-13 14:42:55 +02:00
cmp_sysprefs.pl Bug 9998: new tool to import/export and compare system preferences 2013-07-02 07:08:05 -07:00
fix_accountlines_date.pl Bug 5385: POD Cleanups (part 2) 2010-11-12 10:06:56 +13:00
fix_accountlines_rmdupfines_bug8253.pl Bug 8253 - fix fine doubling, when upgrading from 3.6 to 3.8 - Add de-duplication script 2012-10-28 19:12:30 +01:00
fix_mysql_constraints.pl Bug 8915: Followup FIX QA issues 2012-11-12 10:03:39 -05:00
make_zebra_dom_cfg_from_record_abs Bug 7818: utility to generate DOM indexing configs 2012-06-09 11:44:00 +02:00
process_record_through_filter.pl Bug 7417: Include see from references in bibliographic searches 2012-09-13 14:19:28 +02:00
remove_items_from_biblioitems.pl Bug 5579: further fancifying remove_items_from_biblioitems.pl 2011-05-27 20:01:37 +12:00
touch_all_biblios.pl Bug 5987: Add cl scripts to touch all biblios and items 2011-04-01 20:11:04 +13:00
touch_all_items.pl Bug 5987: Add cl scripts to touch all biblios and items 2011-04-01 20:11:04 +13:00