[Bug 5789] New: Fines don't work when items have null homebranch
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5789 Bug #: 5789 Summary: Fines don't work when items have null homebranch Classification: Unclassified Change sponsored?: --- Product: Koha Version: unspecified Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P5 Component: Circulation AssignedTo: kyle.m.hall@gmail.com ReportedBy: jcamins@cpbibliography.com QAContact: koha-bugs@lists.koha-community.org CC: gmcharlt@gmail.com It seems that the fines cron job cannot handle databases that include items where homebranch, and possibly holdingbranch, are NULL. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5789 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5789 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This sounds like a data problem - would the right fix be to generate a warning? Or should we print a warning at checkout already? -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5789 John.Seymour@nal.gov.au changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |John.Seymour@nal.gov.au --- Comment #2 from John.Seymour@nal.gov.au --- I am having the same problem with the fines cron job. I also have a problem with checking in items which have a NULL homebranch. I get the following error. "No branchcode argument passed to Koha::Calendar->new at /usr/share/koha/lib/C4/Overdues.pm line 310". This is probably due to the fact that my database contains items which where created using a much earlier version of KOHA. A possible solution would be a script to add the missing data to the database for these old items. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5789 Barton Chittenden <barton@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |barton@bywatersolutions.com --- Comment #3 from Barton Chittenden <barton@bywatersolutions.com> --- Fines.pl crashes with the following error messages when processing an item that has a NULL homebranch: Use of uninitialized value $branchcode in exists at /home/koha/kohaclone/misc/cronjobs/fines.pl line 110. No branchcode argument passed to Koha::Calendar->new at /home/koha/kohaclone/misc/cronjobs/fines.pl line 169. Here is the offending code at line 110: 109 # In final case, CircControl must be PickupLibrary. (branchcode comes from issues table here). 110 if ( !exists $is_holiday{$branchcode} ) { 111 $is_holiday{$branchcode} = set_holiday( $branchcode, $today ); 112 } line 169: 166 sub set_holiday { 167 my ( $branch, $dt ) = @_; 168 169 my $calendar = Koha::Calendar->new( branchcode => $branch ); 170 return $calendar->is_holiday($dt); 171 } $branchcode is set here: 104 my $branchcode = 105 ( $control eq 'ItemHomeLibrary' ) ? $overdue->{homebranch} 106 : ( $control eq 'PatronLibrary' ) ? $borrower->{branchcode} 107 : $overdue->{branchcode}; 108 There should be error checking at the following points: after $branchcode is set at line 104 -- if $branchcode is not set, the current item is not valid. A warning should be emitted, and further processing for this record should be skipped. in Koha::Calendar->new() -- If the value of 'branchcode' is not set, a warning should be emitted, and the return value should be undef. after $is_holiday{$branchcode} is set at line 111, it should be tested for 'defined'. If it is undefined, The value should be set to "''", so that !exists $is_holiday{$branchcode} will test correctly on future iterations. When testing, make sure that the 'CircControl' system preference is set to Use the checkout and fines rules of the library the item is from, otherwise the borrower's branchcode may mask the bug. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org