[Bug 6756] New: Patron anonymizing tool reports false success
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6756 Bug #: 6756 Summary: Patron anonymizing tool reports false success Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Platform: All URL: /cgi-bin/koha/tools/cleanborrowers.pl OS/Version: All Status: NEW Severity: major Priority: P5 Component: Tools AssignedTo: gmcharlt@gmail.com ReportedBy: katrin.fischer@bsz-bw.de QAContact: koha-bugs@lists.koha-community.org Problem: Koha gives you no hint, that you have to set up an anonymous patron (system preference AnonymousPatron) for the anonymization to work correctly. Even worse, if you don't have one, it will still report successfull deletion of patron's history, even though nothing has changed in the old_issues table and no informatoin was deleted or anonymized. To reproduce: - Check your AnonymousPatorn system preference is empty - Go to Tools > Delete some old patrons/Anonymize some check-out histor - Uncheck 'Delete borrower who has not borrowed since...' - Select a date near to the present for 'Anonymize check-out history older than...' and 'next' - Check that it reports more than 0 to be anonymized and 'next'
Koha reports successful deletion
If you check the old_issues table before and after the process you will see that nothing has changed. With an anonymous patron set up correctly it works well. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6756 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m --- Comment #1 from Jonathan Druart <jonathan.druart@biblibre.com> --- What do you suggest? -- You are receiving this mail because: You are watching all bug changes. You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6756 --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Jonathan Druart from comment #1)
What do you suggest?
I think we should display a message that as no AnonymousPatron has been set up the data couldn't be anonymized. - Stating we deleted something while we didn't is quite evil in this case. -- You are receiving this mail because: You are watching all bug changes. You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6756 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|gmcharlt@gmail.com |jonathan.druart@bugs.koha-c | |ommunity.org -- You are receiving this mail because: You are watching all bug changes. You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6756 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |christophe.croullebois@bibl | |ibre.com --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- *** Bug 9730 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes. You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6756 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=9942 -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6756 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6756 --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 40985 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40985&action=edit Bug 6756: Fix bad behaviors if AnonymousPatron is not defined There are at least 2 wrong behaviors if the AnonymousPatron pref is not defined (0 or empty string). 1/ If you use the clean borrower tools, you will get a successful message when the nothing happened (the history has not been anonymised). 2/ At the OPAC, if a patron ask for delete his reading history, he will get an error message "The deletion of your reading history failed, because there is a problem with the configuration of this feature. Please help to fix the system by informing your libr ary of this error". IMO this should not happen, the history should be anonymised. With this patch, the old_issues.borrowernumber field will be set to NULL if the AnonymousPatron pref if not defined. Test plan: 1/ Fill the pref with "" or 0 2/ At the OPAC, go on the privacy tab and click on the "Immedia deletion" button. You should get a green and friendly message. Confirm that the history has been anonymised. 3/ Use the "Batch patron anonymization" tools (tools/cleanborrowers.pl) to anonymize the checkout history. Confirm that a) it works and b) you get a message. Try again with AnonymousPatron set to a valid patron. You should not see any changes with the current behaviors. -- You are receiving this mail because: You are watching all bug changes. You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6756 --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 40986 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40986&action=edit Bug 6756: Add info messages -- You are receiving this mail because: You are watching all bug changes. You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6756 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #40985|0 |1 is obsolete| | --- Comment #6 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 41184 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41184&action=edit Bug 6756: Fix bad behaviors if AnonymousPatron is not defined There are at least 2 wrong behaviors if the AnonymousPatron pref is not defined (0 or empty string). 1/ If you use the clean borrower tools, you will get a successful message when the nothing happened (the history has not been anonymised). 2/ At the OPAC, if a patron ask for delete his reading history, he will get an error message "The deletion of your reading history failed, because there is a problem with the configuration of this feature. Please help to fix the system by informing your libr ary of this error". IMO this should not happen, the history should be anonymised. With this patch, the old_issues.borrowernumber field will be set to NULL if the AnonymousPatron pref if not defined. Test plan: 1/ Fill the pref with "" or 0 2/ At the OPAC, go on the privacy tab and click on the "Immedia deletion" button. You should get a green and friendly message. Confirm that the history has been anonymised. 3/ Use the "Batch patron anonymization" tools (tools/cleanborrowers.pl) to anonymize the checkout history. Confirm that a) it works and b) you get a message. Try again with AnonymousPatron set to a valid patron. You should not see any changes with the current behaviors. NOTE: This patch tweaks C4/Circulation.pm and provides tests. applying just this, and running prove success. Reverting just C4/Circulation.pm fails, as expected. Tested OPAC stuff with both patches applied. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes. You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6756 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #40986|0 |1 is obsolete| | --- Comment #7 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 41185 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41185&action=edit Bug 6756: Add info messages NOTE: Before patch "./misc/cronjobs/batch_anonymise.pl --help" had no message, and neither did the anonymizing tool in the staff client. After the patch, both had informative messages. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes. You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6756 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |mtompset@hotmail.com -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6756 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=14655 -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6756 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This works as described, but maybe we could improve some of the messages at some point: "All patrons with checkouts older than 18/04/2015 have been anonymized" We are not anonymizing the patrons, but only their checkouts :) -- You are receiving this mail because: You are watching all bug changes. You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6756 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes. You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6756 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #41184|0 |1 is obsolete| | Attachment #41185|0 |1 is obsolete| | --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 42493 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42493&action=edit [PASSED QA] Bug 6756: Fix bad behaviors if AnonymousPatron is not defined There are at least 2 wrong behaviors if the AnonymousPatron pref is not defined (0 or empty string). 1/ If you use the clean borrower tools, you will get a successful message when the nothing happened (the history has not been anonymised). 2/ At the OPAC, if a patron ask for delete his reading history, he will get an error message "The deletion of your reading history failed, because there is a problem with the configuration of this feature. Please help to fix the system by informing your libr ary of this error". IMO this should not happen, the history should be anonymised. With this patch, the old_issues.borrowernumber field will be set to NULL if the AnonymousPatron pref if not defined. Test plan: 1/ Fill the pref with "" or 0 2/ At the OPAC, go on the privacy tab and click on the "Immedia deletion" button. You should get a green and friendly message. Confirm that the history has been anonymised. 3/ Use the "Batch patron anonymization" tools (tools/cleanborrowers.pl) to anonymize the checkout history. Confirm that a) it works and b) you get a message. Try again with AnonymousPatron set to a valid patron. You should not see any changes with the current behaviors. NOTE: This patch tweaks C4/Circulation.pm and provides tests. applying just this, and running prove success. Reverting just C4/Circulation.pm fails, as expected. Tested OPAC stuff with both patches applied. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6756 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 42494 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42494&action=edit [PASSED QA] Bug 6756: Add info messages NOTE: Before patch "./misc/cronjobs/batch_anonymise.pl --help" had no message, and neither did the anonymizing tool in the staff client. After the patch, both had informative messages. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6756 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=14810 -- You are receiving this mail because: You are watching all bug changes. You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6756 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|Passed QA |Pushed to Master --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patches pushed to master. Thanks Jonathan! -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6756 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz Status|Pushed to Master |Pushed to Stable Summary|Patron anonymizing tool |Patron anonymizing tool |reports false success |reports false success in | |anonymous patron not | |defined --- Comment #12 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.20.x will be in 3.20.4 -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6756 Liz Rea <liz@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |liz@catalyst.net.nz --- Comment #13 from Liz Rea <liz@catalyst.net.nz> --- pushed to 3.18.x will be in 3.18.11 -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6756 --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Liz, This has been backported to 3.18, but the tests use the t::lib::TestBuilder lib which has been introduced by bug 12603, not in 3.18 yet. 04:05:47 Can't locate t/lib/TestBuilder.pm in @INC (you may need to install the t::lib::TestBuilder module) (@INC contains: /srv/jenkins/workspace/Koha_3.18.x_U14/blib/arch /srv/jenkins/workspace/Koha_3.18.x_U14/blib/lib /srv/jenkins/workspace/Koha_3.18.x_U14 /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at t/db_dependent/Circulation/AnonymiseIssueHistory.t line 7. -- You are receiving this mail because: You are watching all bug changes. You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6756 --- Comment #15 from Liz Rea <liz@catalyst.net.nz> --- Ah thanks I'll pull out the tests I suppose. -- You are receiving this mail because: You are watching all bug changes. You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6756 --- Comment #16 from Liz Rea <liz@catalyst.net.nz> --- Pulled the tests out of 3.18.x for 3.18.12. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org