[open-ils-commits] [GIT] Evergreen ILS branch rel_3_1 updated. 7f3e52b69cb2ff55b71c9adcddb239c0c98e3f88

Evergreen Git git at git.evergreen-ils.org
Tue Mar 19 17:23:26 EDT 2019


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_1 has been updated
       via  7f3e52b69cb2ff55b71c9adcddb239c0c98e3f88 (commit)
       via  00b22de2a617249f38a1f445cfa8a7300bd2cd7f (commit)
       via  d5801835b63562753f7dc86f565be45ecd70841c (commit)
       via  979a967c90218ed84b1cc158da1a215bcbfa5876 (commit)
      from  b38e63467af4648778d1c4177f61c429ffaae0fa (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 7f3e52b69cb2ff55b71c9adcddb239c0c98e3f88
Author: Josh Stompro <stompro at stompro.org>
Date:   Tue Feb 26 14:21:06 2019 -0600

    LP1749502 - Holds Pull List Print Order
    
    - Expose call number affix sortkey data.
    - Use sortkey data to sort default pull list template.
    - Combine all call number info into one field in default pull list template.
    - Sorty by shelf location position if it exists, then by shelf location name if it doesn't
    - Only grab copy info if copy is assigned, to not break patron holds grid.
    - Remove some web console logging only needed for testing.
    
    Signed-off-by: Josh Stompro <stompro at stompro.org>
    Signed-off-by: Jason Stephenson <jason at sigio.com>
    Signed-off-by: John Amundson <jamundson at cwmars.org>

diff --git a/Open-ILS/src/templates/staff/share/print_templates/t_hold_pull_list.tt2 b/Open-ILS/src/templates/staff/share/print_templates/t_hold_pull_list.tt2
index cecb3777b8..bd0586f704 100644
--- a/Open-ILS/src/templates/staff/share/print_templates/t_hold_pull_list.tt2
+++ b/Open-ILS/src/templates/staff/share/print_templates/t_hold_pull_list.tt2
@@ -24,21 +24,17 @@ Template for printing a table of holds to pull. Fields include:
       <th>[% l('Title') %]</th>
       <th>[% l('Author') %]</th>
       <th>[% l('Shelf Location') %]</th>
-      <th>[% l('Call Number Prefix') %]</th>
       <th>[% l('Call Number') %]</th>
-      <th>[% l('Call Number Suffix') %]</th>
       <th>[% l('Barcode/Part') %]</th>
     </tr>
   </thead>
   <tbody>
-    <tr ng-repeat="hold_data in holds | orderBy : ['hold._copy_location_position', 'volume.prefix', 'volume.label', 'volume.suffix']">
+    <tr ng-repeat="hold_data in holds | orderBy : ['hold._copy_location_position', 'copy.location.name', 'volume.prefix_sortkey', 'volume.label_sortkey', 'volume.suffix_sortkey']">
       <td>{{hold_data.hold.hold_type}}</td>
       <td>{{hold_data.title}}</td>
       <td>{{hold_data.author}}</td>
       <td>{{hold_data.copy.location.name}}</td>
-      <td>{{hold_data.volume.prefix}}</td>
-      <td>{{hold_data.volume.label}}</td>
-      <td>{{hold_data.volume.suffix}}</td>
+      <td>{{hold_data.volume.prefix}} {{hold_data.volume.label}} {{hold_data.volume.suffix}}</td>
       <td>{{hold_data.copy.barcode}} {{hold_data.part.label}}</td>
     </tr>
   </tbody>
diff --git a/Open-ILS/web/js/ui/default/staff/circ/services/holds.js b/Open-ILS/web/js/ui/default/staff/circ/services/holds.js
index 171d04cf55..7507a764be 100644
--- a/Open-ILS/web/js/ui/default/staff/circ/services/holds.js
+++ b/Open-ILS/web/js/ui/default/staff/circ/services/holds.js
@@ -481,45 +481,51 @@ function($uibModal , $q , egCore , egConfirmDialog , egAlertDialog) {
         // current_copy is not always fleshed in the API
         if (hold.current_copy() && typeof hold.current_copy() != 'object') {
             hold.current_copy(hold_data.copy);
+        }
 
+        if (hold.current_copy()) {
             // likewise, current_copy's status isn't fleshed in the API
             if(hold.current_copy().status() !== null &&
                typeof hold.current_copy().status() != 'object')
                 egCore.pcrud.retrieve('ccs',hold.current_copy().status()
                     ).then(function(c) { hold.current_copy().status(c) });
-        }
-
-        // current_copy's shelving location position isn't always accessible
-        if (hold.current_copy().location()) {
-            console.debug('fetching hold copy location order');
-            var location_id;
-            if (typeof hold.current_copy().location() != 'object') {
-                location_id = hold.current_copy().location();
-            } else {
-                location_id = hold.current_copy().location().id();
+        
+            // current_copy's shelving location position isn't always accessible
+            if (hold.current_copy().location()) {
+                //console.debug('fetching hold copy location order');
+                var location_id;
+                if (typeof hold.current_copy().location() != 'object') {
+                    location_id = hold.current_copy().location();
+                } else {
+                    location_id = hold.current_copy().location().id();
+                }
+                egCore.pcrud.search(
+                    'acplo',
+                    {location: location_id, org: egCore.auth.user().ws_ou()},
+                    null,
+                    {atomic:true}
+                ).then(function(orders) {
+                    if(orders[0]){
+                        hold_data.hold._copy_location_position = orders[0].position();
+                    } else {
+                        hold_data.hold._copy_location_position = 999;
+                    }
+                });
             }
-            egCore.pcrud.search(
-                'acplo',
-                {location: location_id, org: egCore.auth.user().ws_ou()},
-                null,
-                {atomic:true}
-            ).then(function(orders) {
-                hold_data.hold._copy_location_position = orders[0].position();
-            });
-        }
 
-        //Call number affixes are not always fleshed in the API
-        if (hold_data.volume.prefix) {
-            console.debug('fetching call number prefix');
-            console.log(hold_data.volume.prefix());
-            egCore.pcrud.retrieve('acnp',hold_data.volume.prefix())
-            .then(function(p) {hold_data.volume.prefix = p.label()});
-        }
-        if (hold_data.volume.suffix) {
-            console.debug('fetching call number suffix');
-            console.log(hold_data.volume.suffix());
-            egCore.pcrud.retrieve('acns',hold_data.volume.suffix())
-            .then(function(s) {hold_data.volume.suffix = s.label()});
+            //Call number affixes are not always fleshed in the API
+            if (hold_data.volume.prefix) {
+                //console.debug('fetching call number prefix');
+                //console.log(hold_data.volume.prefix());
+                egCore.pcrud.retrieve('acnp',hold_data.volume.prefix())
+                .then(function(p) {hold_data.volume.prefix = p.label(); hold_data.volume.prefix_sortkey = p.label_sortkey()});
+            }
+            if (hold_data.volume.suffix) {
+                //console.debug('fetching call number suffix');
+                //console.log(hold_data.volume.suffix());
+                egCore.pcrud.retrieve('acns',hold_data.volume.suffix())
+                .then(function(s) {hold_data.volume.suffix = s.label(); hold_data.volume.suffix_sortkey = s.label_sortkey()});
+            }
         }
     }
 

commit 00b22de2a617249f38a1f445cfa8a7300bd2cd7f
Author: Jason Stephenson <jason at sigio.com>
Date:   Wed Sep 12 15:34:56 2018 -0400

    LP 1749502: Add Call Number Prefix & Suffix to pull list print template.
    
    We add the call number prefix and suffix as separate columns to the
    holds pull list print template.  We also add the suffix to the end of
    the orderBy so that we also sort by the suffix.
    
    Signed-off-by: Jason Stephenson <jason at sigio.com>
    Signed-off-by: Josh Stompro <stompro at stompro.org>
    Signed-off-by: John Amundson <jamundson at cwmars.org>

diff --git a/Open-ILS/src/templates/staff/share/print_templates/t_hold_pull_list.tt2 b/Open-ILS/src/templates/staff/share/print_templates/t_hold_pull_list.tt2
index 5a06dde9c8..cecb3777b8 100644
--- a/Open-ILS/src/templates/staff/share/print_templates/t_hold_pull_list.tt2
+++ b/Open-ILS/src/templates/staff/share/print_templates/t_hold_pull_list.tt2
@@ -24,17 +24,21 @@ Template for printing a table of holds to pull. Fields include:
       <th>[% l('Title') %]</th>
       <th>[% l('Author') %]</th>
       <th>[% l('Shelf Location') %]</th>
+      <th>[% l('Call Number Prefix') %]</th>
       <th>[% l('Call Number') %]</th>
+      <th>[% l('Call Number Suffix') %]</th>
       <th>[% l('Barcode/Part') %]</th>
     </tr>
   </thead>
   <tbody>
-    <tr ng-repeat="hold_data in holds | orderBy : ['hold._copy_location_position', 'volume.prefix', 'volume.label']">
+    <tr ng-repeat="hold_data in holds | orderBy : ['hold._copy_location_position', 'volume.prefix', 'volume.label', 'volume.suffix']">
       <td>{{hold_data.hold.hold_type}}</td>
       <td>{{hold_data.title}}</td>
       <td>{{hold_data.author}}</td>
       <td>{{hold_data.copy.location.name}}</td>
+      <td>{{hold_data.volume.prefix}}</td>
       <td>{{hold_data.volume.label}}</td>
+      <td>{{hold_data.volume.suffix}}</td>
       <td>{{hold_data.copy.barcode}} {{hold_data.part.label}}</td>
     </tr>
   </tbody>

commit d5801835b63562753f7dc86f565be45ecd70841c
Author: Kyle Huckins <khuckins at catalyte.io>
Date:   Tue May 29 16:06:59 2018 +0000

    lp1749502 Prefix patch
    
    - Ensure prefix information is properly set
    
    Signed-off-by: Kyle Huckins <khuckins at catalyte.io>
    
     Changes to be committed:
            modified:   Open-ILS/src/templates/staff/share/print_templates/t_hold_pull_list.tt2
            modified:   Open-ILS/web/js/ui/default/staff/circ/services/holds.js
    
    Signed-off-by: Jason Stephenson <jason at sigio.com>
    Signed-off-by: Josh Stompro <stompro at stompro.org>
    Signed-off-by: John Amundson <jamundson at cwmars.org>

diff --git a/Open-ILS/src/templates/staff/share/print_templates/t_hold_pull_list.tt2 b/Open-ILS/src/templates/staff/share/print_templates/t_hold_pull_list.tt2
index 8be65d4416..5a06dde9c8 100644
--- a/Open-ILS/src/templates/staff/share/print_templates/t_hold_pull_list.tt2
+++ b/Open-ILS/src/templates/staff/share/print_templates/t_hold_pull_list.tt2
@@ -29,7 +29,7 @@ Template for printing a table of holds to pull. Fields include:
     </tr>
   </thead>
   <tbody>
-    <tr ng-repeat="hold_data in holds | orderBy : ['hold._copy_location_position', 'volume.label']">
+    <tr ng-repeat="hold_data in holds | orderBy : ['hold._copy_location_position', 'volume.prefix', 'volume.label']">
       <td>{{hold_data.hold.hold_type}}</td>
       <td>{{hold_data.title}}</td>
       <td>{{hold_data.author}}</td>
diff --git a/Open-ILS/web/js/ui/default/staff/circ/services/holds.js b/Open-ILS/web/js/ui/default/staff/circ/services/holds.js
index bc3b9273fa..171d04cf55 100644
--- a/Open-ILS/web/js/ui/default/staff/circ/services/holds.js
+++ b/Open-ILS/web/js/ui/default/staff/circ/services/holds.js
@@ -508,16 +508,18 @@ function($uibModal , $q , egCore , egConfirmDialog , egAlertDialog) {
             });
         }
 
-        if (volume) {
-            //Call number affixes are not always fleshed in the API
-            if (volume.prefix() && typeof volume.prefix() != 'object') {
-                console.debug('fetching call number prefix');
-                egCore.pcrud.retrieve('acnp',volume.prefix()).then(function(p) {volume.prefix(p)});
-            }
-            if (volume.suffix() && typeof volume.suffix() != 'object') {
-                console.debug('fetching call number prefix');
-                egCore.pcrud.retrieve('acns',volume.suffix()).then(function(s) {volume.suffix(s)});
-            }
+        //Call number affixes are not always fleshed in the API
+        if (hold_data.volume.prefix) {
+            console.debug('fetching call number prefix');
+            console.log(hold_data.volume.prefix());
+            egCore.pcrud.retrieve('acnp',hold_data.volume.prefix())
+            .then(function(p) {hold_data.volume.prefix = p.label()});
+        }
+        if (hold_data.volume.suffix) {
+            console.debug('fetching call number suffix');
+            console.log(hold_data.volume.suffix());
+            egCore.pcrud.retrieve('acns',hold_data.volume.suffix())
+            .then(function(s) {hold_data.volume.suffix = s.label()});
         }
     }
 

commit 979a967c90218ed84b1cc158da1a215bcbfa5876
Author: Kyle Huckins <khuckins at catalyte.io>
Date:   Thu May 17 21:08:27 2018 +0000

    lp1749502 Holds Pull List Print Order
    
    - Ensure copy shelf location position is available for each hold on
    holds shelf.
    - Add _copy_location_position to hold_data while printing.
    
    Signed-off-by: Kyle Huckins <khuckins at catalyte.io>
    
     Changes to be committed:
            modified:   Open-ILS/src/templates/staff/share/print_templates/t_hold_pull_list.tt2
            modified:   Open-ILS/web/js/ui/default/staff/circ/services/holds.js
    
    Signed-off-by: Jason Stephenson <jason at sigio.com>
    Signed-off-by: Josh Stompro <stompro at stompro.org>
    Signed-off-by: John Amundson <jamundson at cwmars.org>

diff --git a/Open-ILS/src/templates/staff/share/print_templates/t_hold_pull_list.tt2 b/Open-ILS/src/templates/staff/share/print_templates/t_hold_pull_list.tt2
index 47be206f7a..8be65d4416 100644
--- a/Open-ILS/src/templates/staff/share/print_templates/t_hold_pull_list.tt2
+++ b/Open-ILS/src/templates/staff/share/print_templates/t_hold_pull_list.tt2
@@ -29,7 +29,7 @@ Template for printing a table of holds to pull. Fields include:
     </tr>
   </thead>
   <tbody>
-    <tr ng-repeat="hold_data in holds">
+    <tr ng-repeat="hold_data in holds | orderBy : ['hold._copy_location_position', 'volume.label']">
       <td>{{hold_data.hold.hold_type}}</td>
       <td>{{hold_data.title}}</td>
       <td>{{hold_data.author}}</td>
diff --git a/Open-ILS/web/js/ui/default/staff/circ/services/holds.js b/Open-ILS/web/js/ui/default/staff/circ/services/holds.js
index 656e7c4a41..bc3b9273fa 100644
--- a/Open-ILS/web/js/ui/default/staff/circ/services/holds.js
+++ b/Open-ILS/web/js/ui/default/staff/circ/services/holds.js
@@ -481,7 +481,7 @@ function($uibModal , $q , egCore , egConfirmDialog , egAlertDialog) {
         // current_copy is not always fleshed in the API
         if (hold.current_copy() && typeof hold.current_copy() != 'object') {
             hold.current_copy(hold_data.copy);
-            
+
             // likewise, current_copy's status isn't fleshed in the API
             if(hold.current_copy().status() !== null &&
                typeof hold.current_copy().status() != 'object')
@@ -489,6 +489,25 @@ function($uibModal , $q , egCore , egConfirmDialog , egAlertDialog) {
                     ).then(function(c) { hold.current_copy().status(c) });
         }
 
+        // current_copy's shelving location position isn't always accessible
+        if (hold.current_copy().location()) {
+            console.debug('fetching hold copy location order');
+            var location_id;
+            if (typeof hold.current_copy().location() != 'object') {
+                location_id = hold.current_copy().location();
+            } else {
+                location_id = hold.current_copy().location().id();
+            }
+            egCore.pcrud.search(
+                'acplo',
+                {location: location_id, org: egCore.auth.user().ws_ou()},
+                null,
+                {atomic:true}
+            ).then(function(orders) {
+                hold_data.hold._copy_location_position = orders[0].position();
+            });
+        }
+
         if (volume) {
             //Call number affixes are not always fleshed in the API
             if (volume.prefix() && typeof volume.prefix() != 'object') {

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

Summary of changes:
 .../share/print_templates/t_hold_pull_list.tt2     |  4 +-
 .../web/js/ui/default/staff/circ/services/holds.js | 45 +++++++++++++++++-----
 2 files changed, 38 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list