[Bug 42011] New: Unused arguments in members/readingrec.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42011 Bug ID: 42011 Summary: Unused arguments in members/readingrec.pl Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: baptiste.wojtkowski@biblibre.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle@bywatersolutions.com In members/readingrec.pl: 112 my $oc = $patron->old_checkouts( 113 {}, 114 { 115 order_by => 'date_due desc', 116 prefetch => { item => { biblio => 'biblioitems' } }, 117 } 118 )->as_list; old_checkout does not take any argument, is a ->search missing ? order_by syntax looks obsolete too https://metacpan.org/pod/DBIx::Class::ResultSet#order_by -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42011 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |33948 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33948 [Bug 33948] Replace GetAllIssues with Koha::Checkouts - staff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42011 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@gmail.com --- Comment #1 from Jonathan Druart <jonathan.druart@gmail.com> --- Yes, the easiest would be to add a ->search cal for both checkouts and old_checkouts. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42011 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |baptiste.wojtkowski@biblibr |ity.org |e.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42011 --- Comment #2 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Created attachment 195006 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195006&action=edit Bug 42011: [DO NOT PUSH] Add a row argument in search -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42011 --- Comment #3 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42011 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org