Bug 12727 - Patron category filter in batch patron deletion tool is broken
authorJacek Ablewicz <abl@biblos.pk.edu.pl>
Thu, 7 Aug 2014 08:29:37 +0000 (10:29 +0200)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Mon, 11 Aug 2014 14:47:23 +0000 (11:47 -0300)
After commit 6973e3b7d50777a147a29f2f3d213a6175c9eb74, patron category
filter in batch patron deletion tool (tools/cleanborrowers.pl) doesn't
work properly any longer. It's still possible to choose a patron
category as selection criterion, but this criterion is being
efectivelly ignored on futhers steps.

As a result, all patrons (with no check-outs and no outstanding
account balance) may get mistakenly deleted when using this tool,
despite their respective categories.

To test:

1/ apply patch
2/ follow the test plan[s] for Bug 11975

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
tools/cleanborrowers.pl

index 3563c9d..9a9c1ca 100755 (executable)
@@ -183,7 +183,7 @@ sub _get_selection_params {
         dateformat => 'iso',
         dateonly   => 1
     }) if $borrower_dateexpiry;
-    $params->{borrower_categorycode} = $borrower_categorycode if $borrower_categorycode;
+    $params->{category_code} = $borrower_categorycode if $borrower_categorycode;
 
     return $params;
 };