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)
committerGalen Charlton <gmc@esilibrary.com>
Tue, 10 Dec 2013 20:19:00 +0000 (20:19 +0000)
commitf2ad1faa63988b9dbf32cf8f8e35d59e7b584f2b
tree5c4aa3dc0e7b5abaedb97d8974e68ff15a0a7589
parentaca1f5f6a9c5fb58e62ab060c272eadc287bb167
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>
koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt
members/readingrec.pl