[open-ils-commits] [GIT] Evergreen ILS branch rel_3_5 updated. eca9e6e08e4461e805035ad767f63f41f49aadba

Evergreen Git git at git.evergreen-ils.org
Fri Jul 24 16:35:37 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_5 has been updated
       via  eca9e6e08e4461e805035ad767f63f41f49aadba (commit)
      from  6eb7c483360a7ea3eea7dbbaa66e197d601e0543 (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 eca9e6e08e4461e805035ad767f63f41f49aadba
Author: Jane Sandberg <sandbej at linnbenton.edu>
Date:   Mon Aug 19 12:43:33 2019 -0700

    LP1739288: report back on invalid barcodes in Item Status screen
    
    To test:
    
    1) Make a text file with both valid and invalid item barcodes.
    2) Go to Circulation > Item Status and upload your file.
    3) Note that the valid barcodes result in rows in the item status
    screen, and the invalid barcodes are not displayed anywhere.
    4) Apply this commit.
    5) Repeat step 2.
    6) Notice that the invalid barcodes are now reported in a new alert.
    7) Make a text file with only valid barcodes and upload it.
    8) Upload it.  Notice that the alert disappears.
    
    Signed-off-by: Jane Sandberg <sandbej at linnbenton.edu>
    Signed-off-by: Josh Stompro <stompro at stompro.org>
    
    LP1739288: Add a summary report to the list of bad barcodes.
    
    (^^ squash of commit written by Josh Stompro)
    
    Signed-off-by: Jane Sandberg <sandbej at linnbenton.edu>
    Signed-off-by: Josh Stompro <stompro at stompro.org>
    Signed-off-by: Rogan Hamby <rogan.hamby at gmail.com>
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

diff --git a/Open-ILS/src/templates/staff/cat/item/index.tt2 b/Open-ILS/src/templates/staff/cat/item/index.tt2
index 8c2a02e227..1fb54b354e 100644
--- a/Open-ILS/src/templates/staff/cat/item/index.tt2
+++ b/Open-ILS/src/templates/staff/cat/item/index.tt2
@@ -151,6 +151,27 @@
   </div>
 </div>
 
+<div class="row">
+  <div class="col-md-9">
+    <div ng-show="context.itemsNotFound.length" class="alert alert-danger" role="alert">
+      <h3>[% l('The following barcodes are incorrect or deleted') %]</h3>
+      <ul>
+        <li ng-repeat="badBarcode in context.itemsNotFound">{{badBarcode}}</li>
+      </ul>
+    </div>
+  </div>
+  <div class="col-md-3" ng-show="context.fileDoneLoading">
+    <div ng-show="context.itemsNotFound.length" class="alert alert-info" role="alert">
+      <h3>[% l('Summary of file load') %]</h3>
+      <ul>
+        <li>[% l('[_1] valid barcodes', '{{context.numBarcodesInFile - context.itemsNotFound.length}}') %]</li>
+        <li>[% l('[_1] invalid barcodes', '{{context.itemsNotFound.length}}') %]</li>
+        <li>[% l('[_1] total barcodes', '{{context.numBarcodesInFile}}') %]</li>
+      </ul>
+    </div>
+  </div>
+</div>
+
 <div ng-view></div>
 
 [% END %]
diff --git a/Open-ILS/web/js/ui/default/staff/cat/item/app.js b/Open-ILS/web/js/ui/default/staff/cat/item/app.js
index 614db62ecf..a07ee45107 100644
--- a/Open-ILS/web/js/ui/default/staff/cat/item/app.js
+++ b/Open-ILS/web/js/ui/default/staff/cat/item/app.js
@@ -363,6 +363,9 @@ function($scope , $q , $window , $location , $timeout , egCore , egNet , egGridD
     };
 
     $scope.$watch('barcodesFromFile', function(newVal, oldVal) {
+        $scope.context.itemsNotFound = [];
+        $scope.context.fileDoneLoading = false;
+        $scope.context.numBarcodesInFile = 0;
         if (newVal && newVal != oldVal) {
             $scope.args.barcode = '';
             var barcodes = [];
@@ -389,13 +392,20 @@ function($scope , $q , $window , $location , $timeout , egCore , egNet , egGridD
                     if(itemSvc.copies[0]){  // Were any copies actually retrieved
                         copyGrid.selectItems([itemSvc.copies[0].index]);
                     }
+                    $scope.context.fileDoneLoading = true;
                     return;
                 }
 
-                itemSvc.fetch(barcode).then(fetch_next_copy);
+                itemSvc.fetch(barcode).then(function(item) {
+                    if (!item) {
+                        $scope.context.itemsNotFound.push(barcode);
+                    }
+                    fetch_next_copy();
+                })
             }
 
             if (barcodes.length) {
+                $scope.context.numBarcodesInFile = barcodes.length;
                 egProgressDialog.open({value: 0, max: barcodes.length});
                 fetch_next_copy();
             }

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

Summary of changes:
 Open-ILS/src/templates/staff/cat/item/index.tt2  | 21 +++++++++++++++++++++
 Open-ILS/web/js/ui/default/staff/cat/item/app.js | 12 +++++++++++-
 2 files changed, 32 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list