Bug 8154

Summary: The export today's checked in barcodes generated file is always empty
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: CirculationAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact:
Severity: blocker    
Priority: P5 - low CC: chris, francois.charbonnier, gmcharlt, koha.sekjal, paul.poulain, tomascohen
Version: 3.8   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 6430, 6751    
Attachments: Bug 8154 - The export today's checked in barcodes generated file is always empty
Bug 8154 - The export today's checked in barcodes generated file is always empty
Bug 8154: The export today's checked in barcodes generated file is always empty
Bug 8154: The export today's checked in barcodes generated file is always empty

Description Jonathan Druart 2012-05-25 10:38:05 UTC

    
Comment 1 Jonathan Druart 2012-05-25 10:40:37 UTC Comment hidden (obsolete)
Comment 2 Paul Poulain 2012-06-09 10:16:10 UTC
Patch tested with a sandbox, by Francois Charbonnier <francois.charbonnier@biblibre.com>
Comment 3 Paul Poulain 2012-06-09 10:16:29 UTC Comment hidden (obsolete)
Comment 4 Francois Charbonnier 2012-06-09 10:21:12 UTC
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.
Comment 5 Ian Walls 2012-06-15 14:32:37 UTC
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.
Comment 6 Jonathan Druart 2012-06-18 08:19:06 UTC Comment hidden (obsolete)
Comment 7 Tomás Cohen Arazi 2012-06-19 15:17:32 UTC
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.
Comment 8 Ian Walls 2012-06-20 18:42:38 UTC
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.
Comment 9 Chris Cormack 2012-06-23 08:33:24 UTC
Pushed to 3.8.x, will be in 3.8.3