remove_unused_authorities.pl says in the help that it will accept both --test and --t as arguments in order to only test and count eligible authorities without removing them : This script will parse all authoritiestypes given as parameter, and remove authorities without any biblio attached. warning : there is no individual confirmation ! parameters --aut|authtypecode TYPE the list of authtypes to check --t|test test mode, don't delete really, just count --help or -h show this message. but in practice it only accepts --t : GetOptions( 'aut|authtypecode:s' => \@authtypes, 't' => \$test, 'h|help' => \$want_help ); A user launching the script with --test will see a warning that there was an unrecognised option, and the authorities will be deleted
Created attachment 23632 [details] [review] Bug 11417 - remove_unused_authorities.pl doesn't accept --test See commit message for the test plan.
Created attachment 23661 [details] [review] Bug 11417: make sure remove_unused_authorities.pl accepts --test This patches adds support for the --test option, as well as a short message telling the user the script is running in test mode. Test plan : - Launch the script with -h to see the help - Launch the script with --test and --aut with an authtypecode that is used in your instance - Make sure it does the same thing as launching it with -t - Launch the script for real and make sure it still works as expected, deleting unused authorities. Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Created attachment 23667 [details] [review] Bug 11417: make sure remove_unused_authorities.pl accepts --test This patches adds support for the --test option, as well as a short message telling the user the script is running in test mode. Test plan : - Launch the script with -h to see the help - Launch the script with --test and --aut with an authtypecode that is used in your instance - Make sure it does the same thing as launching it with -t - Launch the script for real and make sure it still works as expected, deleting unused authorities. Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Pushed to master. Thanks, Gaetan!
Patch pushed to 3.14.x, will be in 3.14.3.
This patch has been pushed to 3.12.x, will be in 3.12.11. Thanks Gaetan! This is an important fix!