[open-ils-commits] [GIT] Evergreen ILS branch rel_3_4 updated. fd0742990053634894b5d10254b812543a5f59fd

Evergreen Git git at git.evergreen-ils.org
Tue Jul 14 21:11:23 EDT 2020


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, rel_3_4 has been updated
       via  fd0742990053634894b5d10254b812543a5f59fd (commit)
       via  10dee660124e542ea6fb1e736958b241cb2dda6c (commit)
      from  f594911fc97dc53035f871e68507fa6e646320ae (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 fd0742990053634894b5d10254b812543a5f59fd
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Sep 12 09:14:58 2018 -0400

    LP#1712854: Disable all server-side sorting, but provide a stub for later, if we move that way
    
    Signed-off-by: Mike Rylander <mrylander at gmail.com>
    Signed-off-by: John Yorio <jyorio at equinoxinitiative.org>
    Signed-off-by: Jane Sandberg <sandbej at linnbenton.edu>

diff --git a/Open-ILS/src/templates/staff/circ/holds/t_shelf_list.tt2 b/Open-ILS/src/templates/staff/circ/holds/t_shelf_list.tt2
index 71d4abb12e..22a6e39d75 100644
--- a/Open-ILS/src/templates/staff/circ/holds/t_shelf_list.tt2
+++ b/Open-ILS/src/templates/staff/circ/holds/t_shelf_list.tt2
@@ -138,7 +138,7 @@
   <eg-grid-field label="[% l('Hold Note Count') %]" path='hold.note_count' hidden></eg-grid-field>
   <eg-grid-field label="[% l('User Display Name') %]" path='hold.usr_display_name' hidden></eg-grid-field>
   <eg-grid-field label="[% l('User Alias') %]" path='hold.usr_alias' hidden></eg-grid-field>
-  <eg-grid-field label="[% l('User Alias or Display Name') %]" path='hold.usr_alias_or_display_name' nonsortable hidden></eg-grid-field>
+  <eg-grid-field label="[% l('User Alias or Display Name') %]" path='hold.usr_alias_or_display_name' hidden></eg-grid-field>
   <eg-grid-field label="[% l('User Barcode') %]" path='hold.ucard_barcode' hidden></eg-grid-field>
   <eg-grid-field label="[% l('Requestor Username') %]" path='hold.rusr_usrname' hidden></eg-grid-field>
   <eg-grid-field label="[% l('Copy ID') %]" path='hold.cp_id' hidden></eg-grid-field>
diff --git a/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js b/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js
index 3cd875ed40..121cab1921 100644
--- a/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js
+++ b/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js
@@ -1795,7 +1795,9 @@ function($scope , $routeParams , $location , $window , $q , egCore , egHolds , e
         };
 
         var order_by = [{ request_time : null }];
-        if (provider.sort && provider.sort.length) {
+        // NOTE: Server sort is disabled for now.  See the comment on
+        // similar code in circ/holds/app.js for details.
+        if (false && provider.sort && provider.sort.length) {
             order_by = [];
             angular.forEach(provider.sort, function (c) {
                 if (!angular.isObject(c)) {
diff --git a/Open-ILS/web/js/ui/default/staff/circ/holds/app.js b/Open-ILS/web/js/ui/default/staff/circ/holds/app.js
index d73fda75ab..08701c206a 100644
--- a/Open-ILS/web/js/ui/default/staff/circ/holds/app.js
+++ b/Open-ILS/web/js/ui/default/staff/circ/holds/app.js
@@ -90,12 +90,44 @@ function($scope , $q , $routeParams , $window , $location , egCore , egHolds , e
         };
 
         var order_by = [{ shelf_expire_time : null }];
-        if (provider.sort && provider.sort.length) {
+
+        // NOTE: Server sorting is currently disabled entirely by the 
+        // first clause in this 'if'.   This is perfectly fine because
+        // clientsort always runs inside the arrayNotifier implementation
+        // in the egGrid code.   However, in order to retain the memory
+        // of sorting constraints placed on us by the current server-side
+        // code, an initial "cannot sort these" array and test is added
+        // here.  An alternate implementation might be to map fields to
+        // query positions, thus allowing positional ORDER BY clauses.
+        // With as many fields as the wide hold object has, this is
+        // non-trivial at the moment.
+        if (false && provider.sort && provider.sort.length) {
+            // A list of fields we can't sort on the server side.  That's ok, because
+            // the grid is marked clientsort, so it always re-sorts in the browser.
+            var cannot_sort = [
+                'relative_queue_position',
+                'default_estimated_wait',
+                'min_estimated_wait',
+                'potentials',
+                'other_holds',
+                'total_wait_time',
+                'notification_count',
+                'last_notification_time',
+                'is_staff_hold',
+                'copy_location_order_position',
+                'hold_status',
+                'clear_me',
+                'usr_alias_or_display_name',
+                'usr_display_name',
+                'usr_alias_or_first_given_name'
+            ];
+
             order_by = [];
             angular.forEach(provider.sort, function (c) {
                 if (!angular.isObject(c)) {
                     if (c.match(/^hold\./)) {
                         var i = c.replace('hold.','');
+                        if (cannot_sort.includes(i)) return;
                         var ob = {};
                         ob[i] = null;
                         order_by.push(ob);
@@ -105,6 +137,7 @@ function($scope , $q , $routeParams , $window , $location , egCore , egHolds , e
                     var direction = c[i];
                     if (i.match(/^hold\./)) {
                         i = i.replace('hold.','');
+                        if (cannot_sort.includes(i)) return;
                         var ob = {}
                         ob[i] = {dir:direction};
                         order_by.push(ob);

commit 10dee660124e542ea6fb1e736958b241cb2dda6c
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue Sep 11 17:36:30 2018 -0400

    LP#1712854: Add User Alias and User Alias or Display Name columns to shelf list
    
    Signed-off-by: Mike Rylander <mrylander at gmail.com>
    Signed-off-by: John Yorio <jyorio at equinoxinitiative.org>
    Signed-off-by: Jane Sandberg <sandbej at linnbenton.edu>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm
index 6c69acb937..ba9011ddbe 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm
@@ -2379,6 +2379,7 @@ SELECT  h.id, h.request_time, h.capture_time, h.fulfillment_time, h.checkin_time
     my %field_map = (
         record_id => 'r.bib_record',
         usr_id => 'u.id',
+        usr_alias => 'u.alias',
         cs_id => 'cs.id',
         cp_id => 'cp.id',
         cp_deleted => 'cp.deleted',
diff --git a/Open-ILS/src/templates/staff/circ/holds/t_shelf_list.tt2 b/Open-ILS/src/templates/staff/circ/holds/t_shelf_list.tt2
index c385a6f8a2..71d4abb12e 100644
--- a/Open-ILS/src/templates/staff/circ/holds/t_shelf_list.tt2
+++ b/Open-ILS/src/templates/staff/circ/holds/t_shelf_list.tt2
@@ -137,6 +137,8 @@
   <eg-grid-field label="[% l('Transit Cancel Time') %]" path='hold.tr_cancel_time' datatype="timestamp" hidden></eg-grid-field>
   <eg-grid-field label="[% l('Hold Note Count') %]" path='hold.note_count' hidden></eg-grid-field>
   <eg-grid-field label="[% l('User Display Name') %]" path='hold.usr_display_name' hidden></eg-grid-field>
+  <eg-grid-field label="[% l('User Alias') %]" path='hold.usr_alias' hidden></eg-grid-field>
+  <eg-grid-field label="[% l('User Alias or Display Name') %]" path='hold.usr_alias_or_display_name' nonsortable hidden></eg-grid-field>
   <eg-grid-field label="[% l('User Barcode') %]" path='hold.ucard_barcode' hidden></eg-grid-field>
   <eg-grid-field label="[% l('Requestor Username') %]" path='hold.rusr_usrname' hidden></eg-grid-field>
   <eg-grid-field label="[% l('Copy ID') %]" path='hold.cp_id' hidden></eg-grid-field>

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

Summary of changes:
 .../Application/Storage/Publisher/action.pm        |  1 +
 .../templates/staff/circ/holds/t_shelf_list.tt2    |  2 ++
 .../web/js/ui/default/staff/cat/catalog/app.js     |  4 ++-
 Open-ILS/web/js/ui/default/staff/circ/holds/app.js | 35 +++++++++++++++++++++-
 4 files changed, 40 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list