Bug 11009: Do not display circulation history of anonymous patron
authorFridolyn SOMERS <fridolyn.somers@biblibre.com>
Tue, 8 Oct 2013 07:34:42 +0000 (09:34 +0200)
committerFridolin SOMERS <fridolin.somers@biblibre.com>
Tue, 24 Dec 2013 11:09:49 +0000 (12:09 +0100)
commite67b6862f93394f3d4354510c5d060ff902d0129
tree49ab4d52278b69fdd49314978a81df32d64fa892
parente3858f7f630b15e5e0b77d205d0ab64bbc4b8f22
Bug 11009: Do not display circulation history 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 useful 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>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f2ad1faa63988b9dbf32cf8f8e35d59e7b584f2b)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt
members/readingrec.pl