LP1760893 Add Holdings Part dropdown should list items in order
authorDan Pearl <dpearl@cwmars.org>
Tue, 10 Apr 2018 18:45:47 +0000 (14:45 -0400)
committerDan Wells <dbw2@calvin.edu>
Fri, 24 May 2019 21:22:31 +0000 (17:22 -0400)
Without a defined sort, the Part dropdown when editing a holding simply
displays in database order.  Let's be more deterministic about it.

In this case, while slightly surprising, consensus opinion was that
reverse order on label_sortkey provides the best overall usability.
This is obviously true on records with many parts, but can help in all
cases.

Signed-off-by: Dan Pearl <dpearl@cwmars.org>
Signed-off-by: Dan Wells <dbw2@calvin.edu>

Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js

index a9c28c9..c27170a 100644 (file)
@@ -272,7 +272,8 @@ function(egCore , $q) {
 
         return egCore.pcrud.search('bmp',
             {record : rec, deleted : 'f'},
-            null, {atomic : true}
+            {order_by: {bmp : 'label_sortkey DESC'}},
+            {atomic : true}
         ).then(function(list) {
             service.bmp_parts[rec] = list;
             return list;