[Bug 15155] New: Can't call method "truncate" on an undefined value at /usr/share/koha/lib/C4/Circulation.pm line 1966
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15155 Bug ID: 15155 Summary: Can't call method "truncate" on an undefined value at /usr/share/koha/lib/C4/Circulation.pm line 1966 Change sponsored?: --- Product: Koha Version: 3.20 Hardware: All OS: Linux Status: NEW Severity: major Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: fabreupeixoto@gmail.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Hello everyone? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15155 Francisco Peixoto <fabreupeixoto@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |normal Priority|P5 - low |P3 --- Comment #1 from Francisco Peixoto <fabreupeixoto@gmail.com> --- Hi Everyone. This software error message come up when performing items checkin? Can't call method "truncate" on an undefined value at /usr/share/koha/lib/C4/Circulation.pm line 1966 Thank very much in advance for any help. Kind regards -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15155 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Could you report the borrowers.debarred value for the patron you are checkin the item out. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15155 --- Comment #3 from Francisco Peixoto <fabreupeixoto@gmail.com> --- Hello Jonathan, thanks. The value is NULL. And we got the same value for all patrons. I think this is how it should be right? Thank you very much Kind regards Francisco -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15155 --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- With a debarred value set to NULL, I don't know at all how you could get this error. Could you confirm that the line 1966 of your C4/Circulation.pm is the same as the ligne 1972 of the following snippet (from 3.20.x): 1967 } elsif ( $issue->{date_due} and $borrower->{'debarred'} ) { 1968 if ( $borrower->{debarred} eq "9999-12-31") { 1969 $messages->{'ForeverDebarred'} = $borrower->{'debarred'}; 1970 } else { 1971 my $borrower_debar_dt = dt_from_string( $borrower->{debarred} ); 1972 $borrower_debar_dt->truncate(to => 'day'); 1973 my $today_dt = $today->clone()->truncate(to => 'day'); 1974 if ( DateTime->compare( $borrower_debar_dt, $today_dt ) != -1 ) { 1975 $messages->{'PrevDebarred'} = $borrower->{'debarred'}; 1976 } 1977 } -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15155 Heinrich Hartl <Heinrich.Hartl@email.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Heinrich.Hartl@email.de --- Comment #5 from Heinrich Hartl <Heinrich.Hartl@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.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org