[Bug 11009] New: Do not allow reading records of anonymous patron
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11009 Bug ID: 11009 Summary: Do not allow reading records of anonymous patron Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: fridolyn.somers@biblibre.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com When using an anonymous patron to anonymise issues history, this patron may have a huge number of old issues. In this case, trying to display the reading history of this patron will perform a huge SQL query. It is not usefull to have the reading history of this anonymous patron. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11009 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |fridolyn.somers@biblibre.co |ity.org |m --- Comment #1 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- Created attachment 21896 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21896&action=edit Bug 11009 - Do not allow reading records of anonymous patron See commit message -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11009 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11009 --- Comment #2 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- Each reading record will fetch from database all columns of biblio, biblioitems (including marcxml), items and issues or old_issues. So if there are a great number of reading records, the page may create a heavy load on server. Considering the page exists at OPAC, this may be used to overload the server. So I created a follow-up that adds an hardcoded limit to reading records. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11009 --- Comment #3 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- Created attachment 21898 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21898&action=edit Bug 11009 - Add hardcoded limit to OPAC reading records See commit message -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11009 cedric.vita@dracenie.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cedric.vita@dracenie.com --- Comment #4 from cedric.vita@dracenie.com --- After applying the patch : http://pro.test1.biblibre.com/cgi-bin/koha/members/member.pl Software error: Base class package "DBIx::Class::Schema" is empty. (Perhaps you need to 'use' the module which defines that package first, or make that module available in @INC (@INC contains: /home/koha/src /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .). at /home/koha/src/Koha/Schema.pm line 10 BEGIN failed--compilation aborted at /home/koha/src/Koha/Schema.pm line 10. Compilation failed in require at /home/koha/src/Koha/Database.pm line 38. BEGIN failed--compilation aborted at /home/koha/src/Koha/Database.pm line 38. Compilation failed in require at /home/koha/src/Koha/List/Patron.pm line 32. BEGIN failed--compilation aborted at /home/koha/src/Koha/List/Patron.pm line 32. Compilation failed in require at /home/koha/src/members/member.pl line 35. BEGIN failed--compilation aborted at /home/koha/src/members/member.pl line 35. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11009 cedric.vita@dracenie.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA -- You are receiving this mail because: You are watching all bug changes.
After applying the patch : Base class package "DBIx::Class::Schema" is empty. This is because the DBIx::Class::Schema::Loarder, package
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11009 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #5 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- (In reply to cedric.vita from comment #4) libdbix-class-schema-loader-perl must be installed. I have installed it on all sandboxes. Please retest. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11009 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |brendan@bywatersolutions.co | |m --- Comment #6 from Brendan Gallagher <brendan@bywatersolutions.com> --- I think it would be better to have a widget or choice in the staff side for the user to choose the limit of reading records to show for anonymous patron and then have the fall back to the hardcoded limit ? 500 : 50 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11009 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #21898|0 |1 is obsolete| | --- Comment #7 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- Comment on attachment 21898 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21898 Bug 11009 - Add hardcoded limit to OPAC reading records Set has obsolete, should be in another bug -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11009 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11009 --- Comment #8 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- I removed follow-up (addind OPAC limit) so that this bug can focus on the anonymous patron problem. This follow-up may be used for a new bug. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11009 --- Comment #9 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- I've set this as major because it may really block the server. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11009 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11009 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #21896|0 |1 is obsolete| | --- Comment #10 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 22931 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=22931&action=edit [SIGNED-OFF] Bug 11009 - Do not allow reading records of anonymous patron When using an anonymous patron to anonymise issues history, this patron may have a huge number of old issues. In this case, trying to display the reading history of this patron will perform a huge SQL query. It is not usefull to have the reading history of this anonymous patron. This patch adds an alert instead of old issues when displaying reading records of anonymous patron. Test plan : - Set syspref AnonymousPatron to 0. - Select a borrower with old issues. For example 123. - Look at its reading records page : members/readingrec.pl => Old issues are displayed in a datatable - Set syspref AnonymousPatron with this borrower number. For example 123. - Look at its reading records page => Old issues are not displayed and an alert is displayed - Using SQL query, remove old issues of this borrower : DELETE FROM old_issues WHERE borrowernumber=123. - Look at its reading records page => A message is displayed Signed-off-by: Owen Leonard <oleonard@myacpl.org> This works as advertised and seems like a reasonable thing to do. I suspect that someone will object... Perhaps that person will implement a solution which uses an AJAX DataTable. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11009 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11009 --- Comment #11 from Brendan Gallagher <brendan@bywatersolutions.com> --- Created attachment 22977 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=22977&action=edit [PASSED-QA] Bug 11009 - Do not allow reading records of anonymous patron When using an anonymous patron to anonymise issues history, this patron may have a huge number of old issues. In this case, trying to display the reading history of this patron will perform a huge SQL query. It is not usefull to have the reading history of this anonymous patron. This patch adds an alert instead of old issues when displaying reading records of anonymous patron. Test plan : - Set syspref AnonymousPatron to 0. - Select a borrower with old issues. For example 123. - Look at its reading records page : members/readingrec.pl => Old issues are displayed in a datatable - Set syspref AnonymousPatron with this borrower number. For example 123. - Look at its reading records page => Old issues are not displayed and an alert is displayed - Using SQL query, remove old issues of this borrower : DELETE FROM old_issues WHERE borrowernumber=123. - Look at its reading records page => A message is displayed Signed-off-by: Owen Leonard <oleonard@myacpl.org> This works as advertised and seems like a reasonable thing to do. I suspect that someone will object... Perhaps that person will implement a solution which uses an AJAX DataTable. Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11009 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #12 from Galen Charlton <gmcharlt@gmail.com> --- This reminds me of the old joke: "Doctor, it hurts when I do this!" "Well, stop doing it then!" Anyway, pushed to master -- though I would not be entirely surprised if somebody will end up wanting to be able to display a list of anonymized loans. Thanks, Fridolin! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11009 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #13 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- Patches pushed to 3.14.x, will be in 3.14.2. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org