From 9081254a4690fc9489bb4ecd39fec4b1082e5e4f Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Fri, 23 Oct 2020 14:26:10 -0400 Subject: [PATCH] LP#1866406: Use carousel item order Previous to this commit, the item display order for carousels was undefined. Now, ordering is stable and predictable. For Newly Cataloged Item and Newest Items by Shelving Location carousels, the order is from most recently cataloged to least recently cataloged. For Recently Returned Item carousels, the order is from most recently returned to least recently returned. For Top Circulated Items carousels, the order is from most circulated to least circulated. For Manual carousels (as of now, without the ability to adjust the Position of items) it is the order they are added to the backing bucket. Thus emptying and refilling the bucket allows reordering. Signed-off-by: Mike Rylander --- Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm index 907ae8bec0..56f3337a06 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm @@ -436,7 +436,8 @@ sub load_common { '+cc' => { id => $id }, '+bre' => { deleted => 'f' }, '+mfde' => { name => 'title' } - } + }, + order_by => {cbrebi => ['pos','create_time']} }; my $r = $e->json_query($q); $ret->{bibs} = $r; -- 2.11.0