Bug 9944

Summary: cleanborrowers.pl does not check for anonymisation errors
Product: Koha Reporter: Peter Kelly <peterAtKohaBugzilla>
Component: ToolsAssignee: Galen Charlton <gmcharlt>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P5 - low CC: jonathan.druart, peterAtKohaBugzilla
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16966
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 6506, 10165    
Bug Blocks:    

Description Peter Kelly 2013-03-28 07:32:11 UTC
cleanborrowers.pl currently silently carries on if anonymisation fails due to the AnonymousPatron being left at its default or set incorrectly.

If the proposed fix for bug 6506 is accepted, cleanborrowers.pl will "know about" any anonymisation errors as described in that bug.

However, the patch for that bug does not cause cleanborrowers to fail or otherwise report this error, so it continues to silently fail in this case.
Comment 1 Jonathan Druart 2016-08-16 09:09:48 UTC
Still valid:

141     # Anonymising all members
142     if ($do_anonym) {
143         #FIXME: anonymisation errors are not handled
144         ($totalAno,my $anonymisation_error) = AnonymiseIssueHistory($last_issue_date);
145         $template->param(
146             do_anonym   => '1',
147         );
148     }
Comment 2 Jonathan Druart 2016-08-16 09:11:25 UTC
Note that bug 16966 will improve it a bit: the number of records anonymised will be displayed.
Comment 3 Katrin Fischer 2023-01-08 00:53:31 UTC
Code is different now, but the FIXME remained:

# Anonymising all members
146     if ($do_anonym) {
147         #FIXME: anonymisation errors are not handled
148         my $rows = Koha::Old::Checkouts
149                      ->filter_by_anonymizable
150                      ->filter_by_last_update({
151                          to => $last_issue_date, timestamp_column_name => 'returndate' })
152                      ->anonymize;
153 
154         $template->param(
155             do_anonym   => $rows,
156         );
157     }
158