Sort search filter group entries by 'pos'
authorMike Rylander <mrylander@gmail.com>
Thu, 14 Feb 2013 15:51:37 +0000 (10:51 -0500)
committerBill Erickson <berick@esilibrary.com>
Thu, 14 Feb 2013 18:58:07 +0000 (13:58 -0500)
We use a fleshed cstore call to grab search filter groups and their entries,
but we don't currently sort them by their 'pos' field, which is it's purpose.
cstore will apply order_by expressions to the applicable tables in a fleshed
search/retrieve. This does that.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm

index 660b20e..340f9f1 100644 (file)
@@ -559,7 +559,8 @@ sub load_search_filter_groups {
                     flesh_fields => {
                         asfg => ['entries'],
                         asfge => ['query']
-                    }
+                    },
+                    order_by => {asfge => 'pos'}
                 }
             ]);
             $cache{search_filter_groups}{$org_id} = $grps;