[Koha-bugs] [Bug 15155] Can't call method "truncate" on an undefined value at /usr/share/koha/lib/C4/Circulation.pm line 1966

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Jan 25 21:05:52 CET 2016


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

Heinrich Hartl <Heinrich.Hartl at email.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Heinrich.Hartl at email.de

--- Comment #5 from Heinrich Hartl <Heinrich.Hartl at email.de> ---
I am also getting that error:
/usr/share/koha/lib/C4/Circulation.pm line 1966. After reading your questions
we ran a report on our users and found that a group of users has the value
0000-00-00 in column debarred and apparently is haunted by above error when
returning items.

cardnumber;borrowernumber;surname;firstname;debarred
1;1;Admin;Koha;
23529001223637;51;Lanz;Stefan;
23529001223638;52;Pelosi;Silvia;
...
P2304-20150001;57;Landwehr;"Mara ";0000-00-00
P2304-20150002;58;Petry;Margit;0000-00-00
P2304-20150003;59;Friedrich-Sander;Heide;0000-00-00
...
That group may be a set of users that were imported in 2015 under then 3.18.
But I am not sure about this. 
The error message pops up when such users return items.

Unfortunately I do not know how to correct the situation, how to reset 
the values of debarred in table Table testsql_comments.borrowers (assuming this
is the value causing the trouble)

debarred        date    10       √              null                    until
this date the patron can only check-in (no loans, no holds, etc.), is a fine
based on days instead of money (YYY-MM-DD)

If I try to manually correct the debarred date I can not find a menue to do so.
Editing the patron attributes the attributes in this koha version (3.20.00.000)
do not include the debarred date. The koha manual is not helpful.

I have never before operated directly on the mysql database, I only ran reports
sofar. Since I have 186 occurrences of debarred = 0000-00-00 A script would be
helpful. I am also ignorant if it is ok to adjust the debarred value and not to
make other corrections to maintain consistency.

Here are my lines from  sudo vi /usr/share/koha/lib/C4/Circulation.pm


   1965                   my $borrower_debar_dt = dt_from_string(
$borrower->{debarred} );
   1966                   $borrower_debar_dt->truncate(to => 'day');
   1967                   my $today_dt = $today->clone()->truncate(to =>
'day');

-- 
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