]> git.koha-community.org Git - koha.git/commit
Bug 6506: When AnonymousPatron not set, deletion of issue history silently failed.
authorPeter Crellan Kelly <peter@catalyst.net.nz>
Thu, 28 Mar 2013 08:00:47 +0000 (21:00 +1300)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Wed, 1 May 2013 12:44:27 +0000 (08:44 -0400)
commitb856cb3d1d0516067e7fb412cd173a72a9d77f2e
tree41f902619c3b4b850fe051cb1969e228d3976ae7
parente276b0fd78cca293d8e45f7e59fbb5364bdc13d1
Bug 6506: When AnonymousPatron not set, deletion of issue history silently failed.

Remedied by:
- in Circulation.pm changing AnonymiseIssueHistory so that it returns ($rows, $err_history_not_deleted) instead of $rows
- consequential change to misc/cronjobs/batch_anonymise.pl to handle updated return value, and fail if there is an error
- consequential change to tools/cleanborrowers.pl although this still fails silently (raised as bug 9944)
- update of opac-privacy.pl to check return value and pass on error
- update of opac-privacy.tt to display error if appropriate

Note bug 9942 remains unfixed, which is a similar issue upon issue return.

To test:
1. OPAC
- enable privacy mode (preference OpacPrivacy)
- leave anonymous patron set to zero (preference AnonymousPatron)
- attempt to delete user history
- observe error
- check history - still there
- change anonymous patron to a valid user
- attempt to delete user history
- observe success message
- check history - gone

2. cleanborrowers.pl
- test it functions as before.  bug 9944 has been raised for it continuing to silently fail.

3. batch_anonymise.pl
- enable privacy mode (preference OpacPrivacy)
- leave anonymous patron set to zero (preference AnonymousPatron)
- run script (I use --days -1 for testing)
- script should fail with a Carp message
- change anonymous patron to a valid user
- run script as before
- script returns quietly
- check history - gone

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
(cherry picked from commit 571dab9c7cd7f79e936c28fa60d471e6c1288493)

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
C4/Circulation.pm
koha-tmpl/opac-tmpl/prog/en/modules/opac-privacy.tt
misc/cronjobs/batch_anonymise.pl
opac/opac-privacy.pl
tools/cleanborrowers.pl