Created attachment 9774 [details] [review] Bug 8154 - The export today's checked in barcodes generated file is always empty This patch is a fix for Bug 6751 already pushed in master
Patch tested with a sandbox, by Francois Charbonnier <francois.charbonnier@biblibre.com>
Created attachment 10000 [details] [review] Bug 8154 - The export today's checked in barcodes generated file is always empty Comparation of date and datetime is always false Signed-off-by: Francois Charbonnier <francois.charbonnier@biblibre.com>
I did 2 tests : 1/ - checked-out 2 books - checked-in these books through returns.pl page - exported today's checkins barcode 2/ - checked-out 2 books - checked-in these books through circulation.pl page - exported today's checkins barcode In both cases it works.
Reformats the datetime in issue->{returndate} into iso-formatted date. Uses C4::Dates, rather than DateTime, though, which we're looking to phase out. if ( ($input->param('op') eq 'export_barcodes') and ($today eq C4::Dates->new( $issue->{'returndate'}, 'iso' )->output("iso")) ) { could be my $return_dt = Koha::DateUtils::dt_from_string($issue->{'returndate'}, 'iso'); if ( ($input->param('op') eq 'export_barcodes') and ($today eq $return_dt->ymd() ) { My initial testing shows this change should work, and it won't introduce a new dependence on C4::Dates we'll just have to replace later.
Created attachment 10344 [details] [review] Bug 8154: The export today's checked in barcodes generated file is always empty Comparation of date and datetime is always false
Created attachment 10364 [details] [review] Bug 8154: The export today's checked in barcodes generated file is always empty Comparation of date and datetime is always false Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> Exported file contains the list of checked in items.
As this patch implements something I suggested, perhaps I'm not the best person to QA it, but from what I can tell, it does the job of fixing the comparison types most handily, and using modern Koha modules. Marking Passed QA.... if anyone objects to this, please say so.
Pushed to 3.8.x, will be in 3.8.3