Remove unused authorities checks if an authority is used If not it calls DelAuthority DelAuthority checks if the authority is used and removes it from records if it is. We should pass 'skip_merge' when calling form this script as we have already checked the usage here
Created attachment 109431 [details] [review] Bug 26337: Pass skip_merge to DelAuthority when removing unsused authorities This script checks that an authority is not being used before deleting it. We do not need to check biblios for the authority id as we have already verified it is unused. TO test: 1 - Reset db to koha test database 2 - perl misc/migration_tools/remove_unused_authorities.pl -t 3 - Note a number of unsued authorities 4 - perl misc/migration_tools/remove_unused_authorities.pl -c 5 - Note authorities are removed 6 - Reset db 7 - Apply patch 8 - perl misc/migration_tools/remove_unused_authorities.pl -t 9 - Note results are the same 10 - perl misc/migration_tools/remove_unused_authorities.pl -c 11 - Note results are the same
Created attachment 113030 [details] [review] Bug 26337: Pass skip_merge to DelAuthority when removing unsused authorities This script checks that an authority is not being used before deleting it. We do not need to check biblios for the authority id as we have already verified it is unused. TO test: 1 - Reset db to koha test database 2 - perl misc/migration_tools/remove_unused_authorities.pl -t 3 - Note a number of unsued authorities 4 - perl misc/migration_tools/remove_unused_authorities.pl -c 5 - Note authorities are removed 6 - Reset db 7 - Apply patch 8 - perl misc/migration_tools/remove_unused_authorities.pl -t 9 - Note results are the same 10 - perl misc/migration_tools/remove_unused_authorities.pl -c 11 - Note results are the same Signed-off-by: David Nind <david@davidnind.com>
Results from running through the test plan. Before patch applied ==================== perl misc/migration_tools/remove_unused_authorities.pl -t 1706 authorities parsed 493 can be deleted because unused 1213 unchanged because used perl misc/migration_tools/remove_unused_authorities.pl -c 1706 authorities parsed 493 deleted because unused 1213 unchanged because used After patch applied =================== perl misc/migration_tools/remove_unused_authorities.pl -t 1706 authorities parsed 493 can be deleted because unused 1213 unchanged because used perl misc/migration_tools/remove_unused_authorities.pl -c 1706 authorities parsed 493 deleted because unused 1213 unchanged because used
Created attachment 113745 [details] [review] Bug 26337: Pass skip_merge to DelAuthority when removing unsused authorities This script checks that an authority is not being used before deleting it. We do not need to check biblios for the authority id as we have already verified it is unused. TO test: 1 - Reset db to koha test database 2 - perl misc/migration_tools/remove_unused_authorities.pl -t 3 - Note a number of unsued authorities 4 - perl misc/migration_tools/remove_unused_authorities.pl -c 5 - Note authorities are removed 6 - Reset db 7 - Apply patch 8 - perl misc/migration_tools/remove_unused_authorities.pl -t 9 - Note results are the same 10 - perl misc/migration_tools/remove_unused_authorities.pl -c 11 - Note results are the same Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Pushed to master for 20.11, thanks to everybody involved!
Pushed to 20.05.x for 20.05.07
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.