https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42011

--- Comment #3 from Baptiste Wojtkowski (bwoj) 
<[email protected]> ---
Created attachment 195007
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195007&action=edit
Bug 42011: Fix checkouts search in readingrec.pl

Test plan:
1 - Run perl script provided hereafter
2 - Apply first patch. Notice there is a lot of checkouts
3 - Apply second patch, notice you can see only 2 searches

Script:
use C4::Circulation qw( AddIssue AddReturn );
use Koha::Items;
use Koha::Patrons;
use t::lib::Mocks;
use Koha::DateUtils qw(dt_from_string);
my $patron = Koha::Patrons->find(51);
t::lib::Mocks::mock_userenv({patron => $patron});
my $items = Koha::Items->search;
my $patron_unblessed = $patron->unblessed;
my $i = 0;
my $item = $items->next ;
while ( 1 ) {
    my $due = dt_from_string->subtract(days => 45 +
rand(45))->set_hour(23)->set_minute(59)->set_second(00);
    AddIssue($patron, $item->barcode, $due);
    last if ++$i >= 10;
    AddReturn($item->barcode, 'CPL');
}

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to