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

Tomás Cohen Arazi (tcohen) <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]
             Status|Failed QA                   |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #31 from Tomás Cohen Arazi (tcohen) <[email protected]> ---
At this point, I'd say we should target just removing the sub entirely.

It can be replaced with something like:

```perl
   my $overdue_checkouts = Koha::Checkouts->search(
       {
           'me.borrowernumber' => $borrowernumber,
           'me.date_due'       => { '<' => \'NOW()' },
       },
       {
           prefetch => { item => 'biblio' },
           order_by => 'me.date_due',
       }
   );

   while ( my $checkout = $overdue_checkouts->next ) {
       my $item   = $checkout->item;    # already prefetched, no extra query
       my $biblio = $item->biblio;      # already prefetched, no extra query
       printf "%s %s %s\n", $checkout->date_due, $item->barcode,
$biblio->title;
   }
```

Closing this bug.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to