Bug 9944 - cleanborrowers.pl does not check for anonymisation errors
Summary: cleanborrowers.pl does not check for anonymisation errors
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Galen Charlton
QA Contact:
URL:
Keywords:
Depends on: 6506 10165
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-28 07:32 UTC by Peter Kelly
Modified: 2023-01-08 00:53 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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