[Bug 22944] New: avoid AnonymousPatron in search_patrons_to_anonymise
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22944 Bug ID: 22944 Summary: avoid AnonymousPatron in search_patrons_to_anonymise Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: fridolin.somers@biblibre.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Target Milestone: --- In Koha::Patrons::search_patrons_to_anonymise() old issues already affected to the anonymous patron should be avoided. It is useless and can impact performance. It is already working if AnymousPatron is not defined or 0 because of : 'old_issues.borrowernumber' => { 'not' => undef } -- 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=22944 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |fridolin.somers@biblibre.co |ity.org |m Status|NEW |ASSIGNED Depends on| |16966 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16966 [Bug 16966] Koha::Patrons - Move GetBorrowersWithIssuesHistoryOlderThan to search_patrons_to_anonymise -- 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=22944 --- Comment #1 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- In theory the anymous patron should have privacy=0 but in case its not it should be explicitly avoided. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22944 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22944 --- Comment #2 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 89932 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89932&action=edit Bug 22944: change unit tests Add a dedicated UT and correct a test return value -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22944 --- Comment #3 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 89933 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89933&action=edit Bug 22944: avoid AnonymousPatron in search_patrons_to_anonymise In Koha::Patrons::search_patrons_to_anonymise() old issues already affected to the anonymous patron should be avoided. It is useless and can impact performance. It is already working if AnymousPatron is not defined or 0 because of : 'old_issues.borrowernumber' => { 'not' => undef } In theory the anymous patron should have privacy=0 but in case its not it should be explicitly avoided. Test plan : Run t/db_dependent/Koha/Patrons.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22944 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22944 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- You are not explaining in the test description what is really expected. We do not want the update to affect any rows because privacy is set to 0, right? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22944 --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Jonathan Druart from comment #4)
You are not explaining in the test description what is really expected. We do not want the update to affect any rows because privacy is set to 0, right?
Actually it returns > 0 because of previous tests, so it should be adjusted (ideally tests must be independent from each others). I think this test must be removed as it is not testing anything useful: the previous statement will explode if something went wrong. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22944 --- Comment #6 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- (In reply to Jonathan Druart from comment #5)
I think this test must be removed as it is not testing anything useful: the previous statement will explode if something went wrong.
H is( $rows_affected, 0, 'AnonymiseIssueHistory should not return any error if success' ); -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22944 --- Comment #7 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- (In reply to Jonathan Druart from comment #5)
I think this test must be removed as it is not testing anything useful: the previous statement will explode if something went wrong.
Hi, you mean this test ? is( $rows_affected, 0, 'AnonymiseIssueHistory should not return any error if success' ); -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22944 --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Fridolin SOMERS from comment #7)
(In reply to Jonathan Druart from comment #5)
I think this test must be removed as it is not testing anything useful: the previous statement will explode if something went wrong.
Hi, you mean this test ?
is( $rows_affected, 0, 'AnonymiseIssueHistory should not return any error if success' );
yes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22944 --- Comment #9 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 90488 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90488&action=edit Bug 22944: remove obsolete unit test Test 'AnonymiseIssueHistory should not return any error if success' is obsolete, previous statement will explode if something went wrong. Test plan : Run t/db_dependent/Koha/Patrons.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22944 Arthur Bousquet <arthur.bousquet@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22944 Arthur Bousquet <arthur.bousquet@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #90488|0 |1 is obsolete| | --- Comment #10 from Arthur Bousquet <arthur.bousquet@inlibro.com> --- Created attachment 90628 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90628&action=edit Bug 22944: remove obsolete unit test Test 'AnonymiseIssueHistory should not return any error if success' is obsolete, previous statement will explode if something went wrong. Test plan : Run t/db_dependent/Koha/Patrons.t Signed-off-by: Arthur Bousquet <arthur.bousquet@inlibro.com> Current status: Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22944 Nick Clemens <nick@bywatersolutions.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=22944 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #89932|0 |1 is obsolete| | --- Comment #11 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 90904 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90904&action=edit Bug 22944: change unit tests Add a dedicated UT and correct a test return value Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22944 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #89933|0 |1 is obsolete| | --- Comment #12 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 90905 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90905&action=edit Bug 22944: avoid AnonymousPatron in search_patrons_to_anonymise In Koha::Patrons::search_patrons_to_anonymise() old issues already affected to the anonymous patron should be avoided. It is useless and can impact performance. It is already working if AnymousPatron is not defined or 0 because of : 'old_issues.borrowernumber' => { 'not' => undef } In theory the anymous patron should have privacy=0 but in case its not it should be explicitly avoided. Test plan : Run t/db_dependent/Koha/Patrons.t Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22944 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #90628|0 |1 is obsolete| | --- Comment #13 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 90906 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90906&action=edit Bug 22944: remove obsolete unit test Test 'AnonymiseIssueHistory should not return any error if success' is obsolete, previous statement will explode if something went wrong. Test plan : Run t/db_dependent/Koha/Patrons.t Signed-off-by: Arthur Bousquet <arthur.bousquet@inlibro.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22944 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master Version(s)| |19.11.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=22944 --- Comment #14 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work! Pushed to master for 19.11.00 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22944 --- Comment #15 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work! Pushed to master for 19.11.00 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22944 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|19.11.00 |19.11.00,19.05.02 released in| | Status|Pushed to master |Pushed to stable --- Comment #16 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 19.05.x for 19.05.02 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org