[Koha-bugs] [Bug 7272] Fix for Bug 6328 causes user accounts to be frozen

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Nov 30 14:23:33 CET 2011


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

D Ruth Bavousett <ruth at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ruth at bywatersolutions.com

--- Comment #5 from D Ruth Bavousett <ruth at bywatersolutions.com> 2011-11-30 13:23:33 UTC ---
Paul,

It works fine for newly-created borrowers, or any borrower that you block and
unblock on this version, etc.  But the borrowers that were in the database at
the time of the migration to this version, previously having had NULL, numeric
zero, or numeric one, get broken when the updatedatabase.pl is run.  In
particular, borrowers with numeric zero get turned into "0000-00-00", which the
SIP authentication code is not coping with properly; an "if $debarred" will
evaluate as TRUE, which is not what you want here.

The workaround, of course, is this:

UPDATE borrowers SET debarred=NULL WHERE debarred="0000-00-00"; 

...but it may be a better idea to actually fix the SIP code at the point Larry
indicated to cope with the fact that borrowers.debarred is no longer a boolean.
 Similar gotchas may exist elsewhere in Koha.  To do this with minimal code
touching you could set $debarred based on the value (at
C4/SIP/ILS/Patron.pm:51)--if borrowers.debarred is NULL or "0000-00-00" or a
date IN THE PAST, set zero, otherwise, set 1.  Then the rest of the SIP checks
for $debarred would work correctly.

-- 
Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the Koha-bugs mailing list