Bug 38102: Fix limit to 50 items in the checkout history - OPAC
Checkout history does not limit to 50 items, it's a regression from bug 33949. To limit to 50 items we need to use "rows", not "limit". Test plan: Have more than 50 checkouts and confirm that by default the table only displays 50 entries. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> (cherry picked from commitdd28d473cd) Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> (cherry picked from commitef5e67a6ce) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
918a22b5c8
commit
ff92a34ca5
|
|
@ -72,23 +72,23 @@ $limit //= '';
|
|||
$limit = ( $limit eq 'full' ) ? 0 : 50;
|
||||
|
||||
my $checkouts = [
|
||||
$patron->checkouts(
|
||||
$patron->checkouts->search(
|
||||
{},
|
||||
{
|
||||
order_by => $order,
|
||||
prefetch => { item => { biblio => 'biblioitems' } },
|
||||
( $limit ? ( limit => $limit ) : () ),
|
||||
( $limit ? ( rows => $limit ) : () ),
|
||||
}
|
||||
)->as_list
|
||||
];
|
||||
$limit -= scalar(@$checkouts) if $limit;
|
||||
my $old_checkouts = [
|
||||
$patron->old_checkouts(
|
||||
$patron->old_checkouts->search(
|
||||
{},
|
||||
{
|
||||
order_by => $order,
|
||||
prefetch => { item => { biblio => 'biblioitems' } },
|
||||
( $limit ? ( limit => $limit ) : () ),
|
||||
( $limit ? ( rows => $limit ) : () ),
|
||||
}
|
||||
)->as_list
|
||||
];
|
||||
|
|
|
|||
Loading…
Reference in New Issue