Koha/misc/migration_tools
Fridolin Somers bf60a9c88c
Bug 21865: improve remove_unused_authorities.pl script
remove_unused_authorities.pl script can be improved.

This patch changes changes verbosity so than test mode can be used
to know the autorities that are used and those that can be deleted.
It also writes a line in output if limited authority type(s).

This patch also removes the unused vars $thresholdmin and $thresholdmax.

It also changes the query to use SQL with parameters for authority types.

Test plan :
1) On a catalog create a new authority
2) Be sure catalog is well indexed
3) Run misc/migration_tools/remove_unused_authorities.pl -t
4) You will see the line :
   *** Testing only, authorities will not be deleted. ***
5) You will see lines of :
   authid=x type=y : used X time(s)
6) You will see the line for the authority created in 1) :
   authid=x type=y : can be deleted
7) You will see at the end :
   x authorities parsed
   y can be deleted because unused
   z unchanged because used
8) Run misc/migration_tools/remove_unused_authorities.pl
9) You don't see the line :
   *** Testing only, authorities will not be deleted. ***
10) You will see lines of :
   authid=x type=y : used X time(s)
11) You will see the line for the authority created in 1) :
   authid=x type=y : deleted
12) You will see at the end :
   x authorities parsed
   y deleted because unused
   z unchanged because used
13) Run misc/migration_tools/remove_unused_authorities.pl --auth NP --auth CO
14) You see the line :
    Restricted to authority type(s) : NP,CO.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-14 16:53:58 +01:00
..
22_to_30 Bug 22721: Remove frameworkcode parameter in GetMarcFromKohaField calls 2019-07-15 11:28:08 +01:00
ifla Bug 20434: Add default authority type 2019-10-17 15:02:47 +01:00
build_oai_sets.pl Bug 24827: Standardise on 'UTF-8' as the encoding name 2020-03-16 14:45:39 +00:00
buildCOUNTRY.pl Bug 22600: Set 'commandline' interface appropriately 2019-04-10 19:43:11 +00:00
buildEDITORS.pl Bug 22600: Set 'commandline' interface appropriately 2019-04-10 19:43:11 +00:00
buildLANG.pl Bug 22600: Set 'commandline' interface appropriately 2019-04-10 19:43:11 +00:00
bulkmarcimport.pl Bug 15214: bulkmarcimport should log if an authority has been updated 2020-03-24 10:54:46 +00:00
checkNonIndexedBiblios.pl Bug 22600: Set 'commandline' interface appropriately 2019-04-10 19:43:11 +00:00
create_analytical_rel.pl Bug 22600: Set 'commandline' interface appropriately 2019-04-10 19:43:11 +00:00
fix_onloan.pl Bug 23463: Replace ModItem with Koha::Item->store 2020-03-23 09:26:30 +00:00
import_lexile.pl Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
koha-svc.pl Bug 14383: misc: Fix some typos in comments and documentation 2015-06-22 17:34:45 -03:00
rebuild_zebra.pl Bug 23084: Replace grep {^$var$} with grep {$_ eq $var} 2020-02-17 10:44:45 +00:00
rebuild_zebra_sliced.sh Bug 13660: Exclude export phase and use existing exported MARCXML - rebuild_zebra_sliced.sh 2018-01-09 17:23:50 -03:00
remove_unused_authorities.pl Bug 21865: improve remove_unused_authorities.pl script 2020-04-14 16:53:58 +01:00
switch_marc21_series_info.pl Bug 22600: Set 'commandline' interface appropriately 2019-04-10 19:43:11 +00:00
upgradeitems.pl Bug 22600: Set 'commandline' interface appropriately 2019-04-10 19:43:11 +00:00