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@calvin.edu>
Signed-off-by: Dawn Dale <ddale@georgialibraries.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
acqf => [{column => 'year', transform => 'distinct'}]
},
from => 'acqf',
- where => $filter}
- );
+ where => $filter,
+ order_by => {
+ acqf => {"year" => {"direction" => "desc"}}
+ }
+ });
return [map { $_->{year} } @$data];
}
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
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