overdue_notices.pl allows a list with branch codes. Allow similiar functionality for category codes in delete_patrons.pl
To clarify, overdue_notices.pl allows the option -library <branchcode> multiple times. This is about allowing multiple --category_code <categorycode> in delete_patrons.pl
Created attachment 114042 [details] [review] Bug 27050 - Allow multiple category_codes in delete_patrons.pl This patch allows multiple --category_code <categorycode> in delete_patrons.pl The t/db_dependent/Members.t test has 2 added testcases with multiple category_code. To test: 1) Run the test: prove -l . -v t/db_dependent/Members.t 2) This requires records in the database with at least two category codes. For example PT and ST. 3) Run the script: delete_patrons.pl --category_code PT 4) Confirm the number of patrons that would have been deleted. 5) Run the script: delete_patrons.pl --category_code PT --category-code ST 6) Confirm the number of patrons that would have been deleted. 7) Sign Off Sponsored-by: Lunds Universitetsbibliotek
Created attachment 114094 [details] [review] Bug 27050 - Allow multiple category_codes in delete_patrons.pl This patch allows multiple --category_code <categorycode> in delete_patrons.pl The t/db_dependent/Members.t test has 2 added testcases with multiple category_code. To test: 1) Run the test: prove -l . -v t/db_dependent/Members.t 2) This requires records in the database with at least two category codes. For example PT and ST. 3) Run the script: delete_patrons.pl --category_code PT 4) Confirm the number of patrons that would have been deleted. 5) Run the script: delete_patrons.pl --category_code PT --category_code ST 6) Confirm the number of patrons that would have been deleted. 7) Sign Off Sponsored-by: Lunds Universitetsbibliotek Signed-off-by: David Nind <david@davidnind.com>
Note that step 5 should be: 5) Run the script: delete_patrons.pl --category_code PT --category_code ST The last category_code was category-code in the original test plan, with that you get 'Unknown option: category-code' error when running. Everything then works as per the test plan.
Created attachment 116012 [details] [review] Bug 27050 - Allow multiple category_codes in delete_patrons.pl This patch allows multiple --category_code <categorycode> in delete_patrons.pl The t/db_dependent/Members.t test has 2 added testcases with multiple category_code. To test: 1) Run the test: prove -l . -v t/db_dependent/Members.t 2) This requires records in the database with at least two category codes. For example PT and ST. 3) Run the script: delete_patrons.pl --category_code PT 4) Confirm the number of patrons that would have been deleted. 5) Run the script: delete_patrons.pl --category_code PT --category-code ST 6) Confirm the number of patrons that would have been deleted. 7) Sign Off Sponsored-by: Lunds Universitetsbibliotek Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Only forgot this warn: Commit title does not start with 'Bug XXXXX: ' - 363fec6ca0
Created attachment 116503 [details] [review] Bug 27050: Allow multiple category_codes in delete_patrons.pl This patch allows multiple --category_code <categorycode> in delete_patrons.pl The t/db_dependent/Members.t test has 2 added testcases with multiple category_code. To test: 1) Run the test: prove -l . -v t/db_dependent/Members.t 2) This requires records in the database with at least two category codes. For example PT and ST. 3) Run the script: delete_patrons.pl --category_code PT 4) Confirm the number of patrons that would have been deleted. 5) Run the script: delete_patrons.pl --category_code PT --category-code ST 6) Confirm the number of patrons that would have been deleted. 7) Sign Off Sponsored-by: Lunds Universitetsbibliotek Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Pushed to master for 21.05, thanks to everybody involved!
Enhancement not pushed to 20.11.x