LP#1866406: Use carousel item order
authorMike Rylander <mrylander@gmail.com>
Fri, 23 Oct 2020 18:26:10 +0000 (14:26 -0400)
committerJason Boyer <JBoyer@EquinoxInitiative.org>
Mon, 15 Feb 2021 21:31:03 +0000 (16:31 -0500)
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 <mrylander@gmail.com>
Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Signed-off-by: Jason Boyer <JBoyer@EquinoxInitiative.org>

Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm

index ac307e8..053e4b6 100644 (file)
@@ -437,7 +437,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;