[open-ils-commits] [GIT] Evergreen ILS branch master updated. c17e66ae30fb4dcca0a59c3fdbbfba0c4e1b0e76

Evergreen Git git at git.evergreen-ils.org
Tue Mar 14 16:31:31 EDT 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  c17e66ae30fb4dcca0a59c3fdbbfba0c4e1b0e76 (commit)
      from  c7b42d325a55c588f21da73b841780b72a3deb5a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit c17e66ae30fb4dcca0a59c3fdbbfba0c4e1b0e76
Author: Remington Steed <rjs7 at calvin.edu>
Date:   Thu Sep 29 14:55:41 2016 -0400

    LP#1586567 Always return Fund Years sorted descending
    
    Currently, fund year selectors in Acq interfaces (at least Acq Admin ->
    Funds, and Acq -> Load MARC Order Records) show the fund years in
    database order. This commit adds a descending sort to the perl function
    that retrieves fund years for those interfaces. It also removes the
    unsuccessful attempt at sorting that was present in the dojo code.
    
    Signed-off-by: Remington Steed <rjs7 at calvin.edu>
    Signed-off-by: Dawn Dale <ddale at georgialibraries.org>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Financials.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Financials.pm
index 28b4f51..e66e648 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Financials.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Financials.pm
@@ -327,8 +327,11 @@ sub retrieve_org_funds {
                 acqf => [{column => 'year', transform => 'distinct'}]
             }, 
             from => 'acqf', 
-            where => $filter}
-        );
+            where => $filter,
+            order_by => {
+                acqf => {"year" => {"direction" => "desc"}}
+            }
+        });
 
         return [map { $_->{year} } @$data];
     }
diff --git a/Open-ILS/web/js/ui/default/acq/financial/list_funds.js b/Open-ILS/web/js/ui/default/acq/financial/list_funds.js
index 69ec8b4..0d2f7de 100644
--- a/Open-ILS/web/js/ui/default/acq/financial/list_funds.js
+++ b/Open-ILS/web/js/ui/default/acq/financial/list_funds.js
@@ -169,7 +169,6 @@ function loadYearSelector() {
                 yearList = yearList.map(function(year){return {year:year+''};}); // dojo wants strings
 
                 var yearStore = {identifier:'year', name:'year', items:yearList};
-                yearStore.items = yearStore.items.sort().reverse();
                 fundFilterYearSelect.store = new dojo.data.ItemFileWriteStore({data:yearStore});
 
                 // default to this year
diff --git a/Open-ILS/web/js/ui/default/acq/picklist/upload.js b/Open-ILS/web/js/ui/default/acq/picklist/upload.js
index 6abdc69..b2af53f 100644
--- a/Open-ILS/web/js/ui/default/acq/picklist/upload.js
+++ b/Open-ILS/web/js/ui/default/acq/picklist/upload.js
@@ -224,7 +224,6 @@ function loadYearSelector() {
                 yearList = yearList.map(function(year){return {year:year+''};}); // dojo wants strings
 
                 var yearStore = {identifier:'year', name:'year', items:yearList};
-                yearStore.items = yearStore.items.sort().reverse();
                 acqUploadYearSelector.store = new dojo.data.ItemFileReadStore({data:yearStore});
 
                 // until an ordering agency is selected, default to the 

-----------------------------------------------------------------------

Summary of changes:
 .../lib/OpenILS/Application/Acq/Financials.pm      |    7 +++++--
 .../web/js/ui/default/acq/financial/list_funds.js  |    1 -
 Open-ILS/web/js/ui/default/acq/picklist/upload.js  |    1 -
 3 files changed, 5 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list