[Bug 33229] New: Patron reading history should be cleared when privacy set to never
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33229 Bug ID: 33229 Summary: Patron reading history should be cleared when privacy set to never Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org If a patron chooses to never keep privacy we should immediately remove their history, rather than waiting on the anonymization cronjob -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33229 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33229 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 148186 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=148186&action=edit Bug 33229: Clear patron reading history when privacy is set to never This patch adds a check to patron store routine. When privacy is changed to 'Never' we should immediately clear their history To test: 1 - Set system preferences: AnonymousPatron - to a valid borrowernumber OPACPrivacy - Allow 2 - Checkout some items to a patron with priacy set to default, return them 3 - Log in to opac as patron 4 - Confirm you can see your history 5 - Change history to Never 6 - Confirm history still viewable 7 - Apply patch, restart all 8 - Set privacy to Default 9 - Confirm you can still see history, not deleted when not set as Never 10 - Set privacy to 'Never' 11 - Confirm history is anonymized -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33229 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33229 ByWater Sandboxes <bws.sandboxes@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #148186|0 |1 is obsolete| | --- Comment #2 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 148197 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=148197&action=edit Bug 33229: Clear patron reading history when privacy is set to never This patch adds a check to patron store routine. When privacy is changed to 'Never' we should immediately clear their history To test: 1 - Set system preferences: AnonymousPatron - to a valid borrowernumber OPACPrivacy - Allow 2 - Checkout some items to a patron with priacy set to default, return them 3 - Log in to opac as patron 4 - Confirm you can see your history 5 - Change history to Never 6 - Confirm history still viewable 7 - Apply patch, restart all 8 - Set privacy to Default 9 - Confirm you can still see history, not deleted when not set as Never 10 - Set privacy to 'Never' 11 - Confirm history is anonymized Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33229 Sally <sally.healey@cheshiresharedservices.gov.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sally.healey@cheshireshared | |services.gov.uk Status|Needs Signoff |Signed Off --- Comment #3 from Sally <sally.healey@cheshiresharedservices.gov.uk> --- Works great, thanks for the patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33229 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33229 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #148197|0 |1 is obsolete| | --- Comment #4 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 148546 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=148546&action=edit Bug 33229: Clear patron reading history when privacy is set to never This patch adds a check to patron store routine. When privacy is changed to 'Never' we should immediately clear their history To test: 1 - Set system preferences: AnonymousPatron - to a valid borrowernumber OPACPrivacy - Allow 2 - Checkout some items to a patron with priacy set to default, return them 3 - Log in to opac as patron 4 - Confirm you can see your history 5 - Change history to Never 6 - Confirm history still viewable 7 - Apply patch, restart all 8 - Set privacy to Default 9 - Confirm you can still see history, not deleted when not set as Never 10 - Set privacy to 'Never' 11 - Confirm history is anonymized Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33229 --- Comment #5 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 148547 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=148547&action=edit Bug 33229: Remove unecessary txn We don't need a transaction here. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33229 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com --- Comment #6 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Nick, I don't understand why you need a txn here. Do you agree with removing it? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33229 --- Comment #7 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #6)
Nick, I don't understand why you need a txn here. Do you agree with removing it?
My assumption was that I copied it from somewhere, but I don't see that. Possibly I thought we didn't want partial deletion? But if we are trying to anonymize i suppose removing some is better than none -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33229 --- Comment #8 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Nick Clemens from comment #7)
(In reply to Jonathan Druart from comment #6)
Nick, I don't understand why you need a txn here. Do you agree with removing it?
My assumption was that I copied it from somewhere, but I don't see that.
Possibly I thought we didn't want partial deletion? But if we are trying to anonymize i suppose removing some is better than none
It's done in a single query 104 return $self->update( { borrowernumber => $anonymous_id }, { no_triggers => 1 } ); So it's either all or none. Anyway, thanks for you reply! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33229 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |23.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33229 --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.05. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33229 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Nick, git bisect (not me!) blames you for the failing test on master: https://jenkins.koha-community.org/job/Koha_Master/2479/testReport/junit/(ro... I had a look, but couldn't figure it out: # Failed test 'fill() tests' # at t/db_dependent/Koha/Hold.t line 307. Exception 'Koha::Exceptions::SysPref::NotSet' thrown 'Required syspref is not set' with syspref => AnonymousPatron # Looks like your test exited with 255 just after 2. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 10/11 subtests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33229 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- This broke tests. Please review the consequences of this new exception thrown, on the UI as well. kohadev-koha@kohadevbox:koha(master)$ prove t/db_dependent/Koha/Hold.t t/db_dependent/Koha/Hold.t .. 1/11 # Looks like you planned 5 tests but ran 2. # Failed test 'anonymization behavior tests' # at t/db_dependent/Koha/Hold.t line 265. # Looks like you planned 13 tests but ran 12. # Looks like you failed 1 test of 12 run. t/db_dependent/Koha/Hold.t .. 2/11 # Failed test 'fill() tests' # at t/db_dependent/Koha/Hold.t line 307. Exception 'Koha::Exceptions::SysPref::NotSet' thrown 'Required syspref is not set' with syspref => AnonymousPatron # Looks like your test exited with 255 just after 2. t/db_dependent/Koha/Hold.t .. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 10/11 subtests Test Summary Report ------------------- t/db_dependent/Koha/Hold.t (Wstat: 65280 Tests: 2 Failed: 1) Failed test: 2 Non-zero exit status: 255 Parse errors: Bad plan. You planned 11 tests but ran 2. Files=1, Tests=2, 3 wallclock secs ( 0.02 usr 0.00 sys + 2.91 cusr 0.55 csys = 3.48 CPU) Result: FAIL -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33229 --- Comment #12 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 149753 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=149753&action=edit Bug 33229: (follow-up) Adjust tests to set anonymous patron before setting patron privacy to 2 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33229 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | --- Comment #13 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Follow-up pushed. Thanks Nick for the quick fix. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33229 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|23.05.00 |23.05.00,22.11.05 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33229 --- Comment #14 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Nice work everyone! Pushed to stable for 22.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33229 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |RESOLVED Resolution|--- |FIXED CC| |lucas@bywatersolutions.com --- Comment #15 from Lucas Gass <lucas@bywatersolutions.com> --- Doesn't apply clean to 22.05.x, no backport. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org