LP1464767: Sort Org Units by Shortname user/jboyer/lp1464767_sort_aou
authorJason Boyer <jboyer@library.in.gov>
Fri, 15 Jan 2016 13:39:27 +0000 (08:39 -0500)
committerJason Boyer <jboyer@library.in.gov>
Fri, 15 Jan 2016 13:39:27 +0000 (08:39 -0500)
Depending on future use cases this may need to be
made more generic, but as far as I'm currently aware
the only use for this list is to be displayed by
shortname, which is how they're now sorted.

Signed-off-by: Jason Boyer <jboyer@library.in.gov>
Open-ILS/web/js/ui/default/staff/services/env.js

index 25198fa..e948fb5 100644 (file)
@@ -147,7 +147,7 @@ function($q,  $window , egAuth,  egPCRUD,  egIDL) {
             }
 
             return egPCRUD.search('aou', {parent_ou : null}, 
-                {flesh : -1, flesh_fields : {aou : ['children', 'ou_type']}}
+                {flesh : -1, flesh_fields : {aou : ['children', 'ou_type']}, order_by : {aou : 'shortname ASC'}}
             ).then(
                 function(tree) {
                     $window.sessionStorage.setItem(