[Koha-bugs] [Bug 14655] Cannot checkin without Anonymous Patron

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Aug 13 21:10:12 CEST 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14655

--- Comment #9 from Jesse Weaver <jweaver at bywatersolutions.com> ---
(In reply to Jonathan Druart from comment #7)
> (In reply to Jesse Weaver from comment #4)
> > The issue here is that there can be a large number of patrons with a privacy
> > of 2 ("Never") even if all of the following are true:
> > 
> >   * OPACPrivacy is off
> >   * All patron categories have a default privacy of Forever or Default
> > 
> > This can occur for three major reasons:
> > 
> >   * The patrons had their privacy settings changed when OPACPrivacy was
> > previously enabled, but it has since been disabled
> 
> Restricting the privacy of the users is really not kind. Especially if they
> had chosen to protect their data previously.
> I'd say it's like breaking a contract :)
> 
> >   * The patrons were imported with a privacy of 2
> 
> They should not have been imported with privacy=2 if OPACPrivacy is off.
> 
> >   * A patron category had a default privacy setting of Never at the time the
> > patron was created (if the category's default privacy setting is later
> > changed, it does not affect the privacy of previously created patrons)
> 
> Same as before, there is an inconsistency in the configuration ('Never' with
> OPACPrivacy off).
> 
> > This isn't an edge case; we have a large number of libraries whose checkins
> > were silently failing after a bugfix upgrade due to one of the three
> > scenarios above.
> 
> You should have got a big warnings during the updatedatabase process, don't
> you got it?
> 
> (In reply to Katrin Fischer from comment #5)
> > Hm, so it looks like the main problme is a mismatch of the template logic to
> > display the warning with the logic in the module? (privacy setting of the
> > borrower vs. system preferences?)
> 
> The checks look good to me.
> 
> We could apply the following changes:
> 
> diff --git a/C4/Circulation.pm b/C4/Circulation.pm
> index 7813e33..2e06ff2 100644
> --- a/C4/Circulation.pm
> +++ b/C4/Circulation.pm
> @@ -2077,7 +2077,7 @@ sub MarkIssueReturned {
>      my ( $borrowernumber, $itemnumber, $dropbox_branch, $returndate,
> $privacy ) = @_;
>  
>      my $anonymouspatron;
> -    if ( $privacy == 2 ) {
> +    if ( $privacy == 2 and C4::Context->preference('OPACPrivacy') ) {
> 
> But I still think the privacy should be respected and the data updated if
> inconsistencies exist.

Oh, indeed. Would it be possible to show the warning if anonymouspatron is not
set and a patron exists with privacy == 2? It's not necessarily a huge issue
with how the backend works, the issue is when the checkin explodes with no
indication as to why.

Doing this with "SELECT borrowernumber FROM borrowers WHERE privacy = 2 LIMIT
1" ran in 0.02s on one of our largest sites (~125K borrowers), so it is
practical.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list