Koha/t/db_dependent/Circulation
Jonathan Druart 224b1c7976 Bug 6756: Fix bad behaviors if AnonymousPatron is not defined
There are at least 2 wrong behaviors if the AnonymousPatron pref is not
defined (0 or empty string).
1/ If you use the clean borrower tools, you will get a successful
message when the nothing happened (the history has not been anonymised).
2/ At the OPAC, if a patron ask for delete his reading history, he will
get an error message "The deletion of your reading history failed,
because there is a problem with the configuration of this feature.
Please help to fix the system by informing your libr    ary of this
error". IMO this should not happen, the history should be anonymised.

With this patch, the old_issues.borrowernumber field will be set to NULL
if the AnonymousPatron pref if not defined.

Test plan:
1/ Fill the pref with "" or 0
2/ At the OPAC, go on the privacy tab and click on the "Immedia deletion" button.
You should get a green and friendly message. Confirm that the history
has been anonymised.
3/ Use the "Batch patron anonymization" tools (tools/cleanborrowers.pl)
to anonymize the checkout history.
Confirm that a) it works and b) you get a message.

Try again with AnonymousPatron set to a valid patron. You should not see
any changes with the current behaviors.

NOTE: This patch tweaks C4/Circulation.pm and provides tests.
      applying just this, and running prove success. Reverting just
      C4/Circulation.pm fails, as expected.
      Tested OPAC stuff with both patches applied.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-09-16 10:55:42 -03:00
..
IssuingRules Bug 12230: (follow-up) improve unit tests 2014-05-26 02:01:51 +00:00
AnonymiseIssueHistory.t Bug 6756: Fix bad behaviors if AnonymousPatron is not defined 2015-09-16 10:55:42 -03:00
CheckIfIssuedToPatron.t Bug 12470: (followup) License statement missing 2014-07-14 08:57:06 -03:00
CheckValidBarcode.t Bug 12470: (followup) License statement missing 2014-07-14 08:57:06 -03:00
GetIssues.t Bug 11201: Add a in-house use list pages 2015-03-31 11:30:55 -03:00
IsItemIssued.t Bug 11338: add unit tests for DelItemCheck 2013-12-25 17:07:53 +00:00
MarkIssueReturned.t Bug 9942: Make Koha fails if privacy is not respected 2015-07-07 14:52:32 -03:00
Returns.t Bug 13297 - Shelving location PROC does not work according to manual 2014-11-23 10:11:28 -03:00