From 4334ffe234bba4daec0f9ffed60c2e74fedc3bb8 Mon Sep 17 00:00:00 2001 From: Josh Stompro Date: Tue, 23 Aug 2016 08:31:12 -0500 Subject: [PATCH] Reverse search order for Monographic parts. Show newest magazine parts first. Signed-off-by: Josh Stompro --- Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm | 2 +- Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm | 2 +- Open-ILS/src/templates/conify/global/biblio/monograph_part.tt2 | 2 +- Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm index 0fad7d97e7..973a0ceb6b 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm @@ -2095,7 +2095,7 @@ sub basic_opac_copy_query { order_by => [ {class => 'aou', field => 'name'}, {class => 'acn', field => 'label_sortkey'}, - {class => 'bmp', field => 'label_sortkey'}, + {class => 'bmp', field => 'label_sortkey', direction => 'desc'}, {class => 'acp', field => 'copy_number'}, {class => 'acp', field => 'barcode'} ], diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm index 5c077903f4..384921fe06 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm @@ -2613,7 +2613,7 @@ sub rec_hold_parts { }, deleted => 'f' }, - order_by =>[{class=>'bmp', field=>'label_sortkey'}] + order_by =>[{class=>'bmp', field=>'label_sortkey', direction=>'desc'}] }; if(defined $pickup_lib) { diff --git a/Open-ILS/src/templates/conify/global/biblio/monograph_part.tt2 b/Open-ILS/src/templates/conify/global/biblio/monograph_part.tt2 index d0d0dac99e..5534e0d438 100644 --- a/Open-ILS/src/templates/conify/global/biblio/monograph_part.tt2 +++ b/Open-ILS/src/templates/conify/global/biblio/monograph_part.tt2 @@ -37,7 +37,7 @@ openils.Util.addOnLoad( function() { monoPartGrid.overrideEditWidgets.record = new dijit.form.TextBox({"disabled": true}); monoPartGrid.overrideEditWidgets.record.shove = { create : cgi.param('r') }; - monoPartGrid.loadAll({order_by : [{class : 'bmp', field : 'label_sortkey'}]}, {deleted : 'f', record : cgi.param('r')}); + monoPartGrid.loadAll({order_by : [{class : 'bmp', field : 'label_sortkey', direction : 'desc'}]}, {deleted : 'f', record : cgi.param('r')}); }); [% END %] diff --git a/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js b/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js index 950488ffd1..45845faccd 100644 --- a/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js +++ b/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js @@ -205,7 +205,7 @@ function my_init() { dojo.require('openils.PermaCrud'); g.pcrud = new openils.PermaCrud({'authtoken':ses()}); - g.parts = g.pcrud.search('bmp',{'deleted':'f', 'record':g.doc_id},{'order_by': { 'bmp' : 'label_sortkey' } }); + g.parts = g.pcrud.search('bmp',{'deleted':'f', 'record':g.doc_id},{'order_by': { 'bmp' : 'label_sortkey DESC' } }); g.parts_hash = util.functional.convert_object_list_to_hash( g.parts ); /***********************************************************************************************************/ -- 2.11.0