Bug 18414: Allow to use other select criteria with delete_patrons.pl
authorRogan Hamby <rogan.hamby@gmail.com>
Fri, 11 Oct 2019 12:47:55 +0000 (08:47 -0400)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 24 Mar 2020 10:42:18 +0000 (10:42 +0000)
commit5e2fe4418dab6549668eedde28cbee394f036841
tree62a31425ec211c6d1ced2377946d1428c9d5d896
parenta373a6a27257d8d4d140f7f1c5f1c8d5c334d4a2
Bug 18414: Allow to use other select criteria with delete_patrons.pl

Adds the ability to specify a file with the --file flag that
should be a list of borrowernumbers for deletion.
If used without other flags it will delete the list of borrowers,
if used with other flags it will treat the other criteria
as filters for the list.

To Test:
1) Specify a list, e.g. borrowers.txt, of borrowernumbers in the database and put them in a text file with one per line
2) Invoke the script like ./delete_patrons.pl --file borrowers.txt to delete those patrons
3) Populate the list with a mix of borrowers in a category and those not, say categoryfoo
4) Invoke the scirpt as ./delete_patrons.pl --category_code categoryfoo --file borrowers.txt
5) Only the borrowers in the file that have the specified category will be deleted

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
misc/cronjobs/delete_patrons.pl