Bug 15677

Summary: Misconfigured anonymous patron allows checkouts to multiple patrons.
Product: Koha Reporter: Barton Chittenden <barton>
Component: CirculationAssignee: Bugs List <koha-bugs>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: critical    
Priority: P5 - low CC: gmcharlt, jonathan.druart, kyle.m.hall
Version: 3.20   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9942
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14978
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Barton Chittenden 2016-01-26 23:58:30 UTC
Bug was found on 3.20.04.000.

Configuration:

Patron 1 has has his privacy settings set to anonymize upon check-in (2).
AnonymousPatron systempreference is set to a number that does not correspond to any borrowernumber.
OpacPrivacy is set to 1.

Steps to reproduce:

1) Check out item to Patron 1
   -- At this point, you can try to check in the item, it will fail because anonymous patron settings are mis-configured.

2) Check out the same item to any other patron. The check-out will succeed, and you will see error such as this in the logs:

circulation.pl: Fatal error: the patron (16) has requested their circulation history be anonymized on check-in, but the AnonymousPatron system preference is empty or not set correctly. at /usr/share/koha/lib/C4/Circulation.pm line 2086.
Comment 1 Jonathan Druart 2016-01-27 09:55:40 UTC
It's the expected behavior: the pref is not set correctly, it's a configuration issue.
You should also get a warning on the about page.
Comment 2 Barton Chittenden 2016-01-27 18:56:15 UTC
(In reply to Jonathan Druart from comment #1)
> It's the expected behavior: the pref is not set correctly, it's a
> configuration issue.
> You should also get a warning on the about page.

Not allowing the item to be checked in may expected behavior (I'm willing to argue the point), but allowing the item to be checked out to two patrons at the same time is *definitely* a bug.

--Barton
Comment 3 Jonathan Druart 2016-01-29 10:20:28 UTC
Barton, this should be fixed by the addition of the unique key on issues.itemnumber, see bug 14978 (in 3.20.7)
Comment 4 Jonathan Druart 2016-02-02 12:34:16 UTC
Please confirm.
Comment 5 Jonathan Druart 2016-02-15 17:37:20 UTC
Marking as a duplicate of bug 14978.
Please reopen if I am wrong.

*** This bug has been marked as a duplicate of bug 14978 ***