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

Evergreen Git git at git.evergreen-ils.org
Fri Feb 21 13:37:10 EST 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, master has been updated
       via  559541a5506776ba1b47d18b151e38b1f938dd9f (commit)
       via  7e98d9071c7029289bf9fa008a85e7d852a26b13 (commit)
       via  d386d7c604d92b443e1698fb1efa5d6f5eb45627 (commit)
       via  56dfce3defcd77303ef59c29a982cfcc8c193e75 (commit)
      from  a63533f3ce0835f9c9c4d6ecff85ea90b47b6804 (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 559541a5506776ba1b47d18b151e38b1f938dd9f
Author: Remington Steed <rjs7 at calvin.edu>
Date:   Tue Jul 30 15:52:39 2019 -0400

    LP#1761222: Replace bib "quality" with item "mint_condition"
    
    I originally misunderstood the XUL item field labeled "quality" and
    pulled in the bib record "overall quality" score. But upon checking the
    XUL holdings maintenance screen again, we clearly want the item's
    "mint_condition" field instead. This commit makes that correction and
    converts the 't' or 'f' values into "Good" or "Damaged", to match the
    item editor labels.
    
    Signed-off-by: Remington Steed <rjs7 at calvin.edu>
    Signed-off-by: Tiffany Little <tlittle at georgialibraries.org>
    Signed-off-by: Chris Sharp <csharp at georgialibraries.org>

diff --git a/Open-ILS/src/templates/staff/cat/catalog/t_holdings.tt2 b/Open-ILS/src/templates/staff/cat/catalog/t_holdings.tt2
index 3d827ddac5..8b77183b20 100644
--- a/Open-ILS/src/templates/staff/cat/catalog/t_holdings.tt2
+++ b/Open-ILS/src/templates/staff/cat/catalog/t_holdings.tt2
@@ -141,7 +141,9 @@
     <eg-grid-field label="[% l('Classification') %]"          path="call_number.label_class.name" hidden></eg-grid-field>
     <eg-grid-field label="[% l('Due Date') %]"                path="_circ.due_date" datecontext="_circ_lib" dateonlyinterval="_duration" datatype="timestamp" visible></eg-grid-field>
     <eg-grid-field label="[% l('OPAC Visible?') %]"           datatype="bool" path="opac_visible" hidden></eg-grid-field>
-    <eg-grid-field label="[% l('Quality') %]"                 path="call_number.record.simple_record.quality" hidden></eg-grid-field>
+    <eg-grid-field label="[% l('Quality') %]"                 path="mint_condition" hidden>
+      <span>{{ item['mint_condition']=='t' ? '[% l('Good') %]' : '[% l('Damaged') %]' }}</span>
+    </eg-grid-field>
   
   </eg-grid>
 </div>

commit 7e98d9071c7029289bf9fa008a85e7d852a26b13
Author: Bill Erickson <berickxx at gmail.com>
Date:   Tue Feb 5 15:35:51 2019 -0500

    LP1761222 Holdings batch circ retrieval
    
    Fetch non-checked-in circulations for copies in the Holdings
    maintenance grid (for due date display) in batch instead firing a
    potentially vary large parallel batch of pcrud API calls.
    
    This also limits due date display to items that have open circulations,
    consistent with the XUL client.
    
    Signed-off-by: Bill Erickson <berickxx at gmail.com>
    Signed-off-by: Remington Steed <rjs7 at calvin.edu>
    Signed-off-by: Tiffany Little <tlittle at georgialibraries.org>
    Signed-off-by: Chris Sharp <csharp at georgialibraries.org>

diff --git a/Open-ILS/web/js/ui/default/staff/cat/services/holdings.js b/Open-ILS/web/js/ui/default/staff/cat/services/holdings.js
index 78055cf402..73c91a350b 100644
--- a/Open-ILS/web/js/ui/default/staff/cat/services/holdings.js
+++ b/Open-ILS/web/js/ui/default/staff/cat/services/holdings.js
@@ -137,22 +137,29 @@ function(egCore , $q) {
                         cp.copy_alert_count = cp.copy_alerts.filter(function(aca) { return aca.ack_time == null ;}).length;
                     }
                     else cp.copy_alert_count = 0;
-
-                    var copy_circ = egCore.pcrud.search('combcirc', { target_copy : cp.id },
-                        {
-                            order_by : {combcirc : 'xact_start desc'},
-                            limit :  1
-                        }
-                    ).then(function(copy_circ) {
-                        if (copy_circ) {
-                            cp._circ = egCore.idl.toHash(copy_circ, true);
-                            cp._circ_lib = copy_circ.circ_lib();
-                            cp._duration = copy_circ.duration();
-                        }
-                        return copy_circ;
-                    });
                 });
 
+                // Grab the open circulation (i.e. checkin_time=null) for
+                // all of the copies we're rendering so we can display
+                // due date info.  There should only ever be one circulation
+                // at most with checkin_time=null for any copy.
+                var copyIds = svc.copies.map(function(cp) {return cp.id})
+                    .filter(function(id) {return Boolean(id)}); // avoid nulls
+
+                egCore.pcrud.search('circ', 
+                    {target_copy: copyIds, checkin_time: null}
+                ).then(
+                    null, // complete
+                    null, // error
+                    function(circ) {
+                        var cp = svc.copies.filter(function(c) { 
+                            return c.id == circ.target_copy() })[0];
+                        cp._circ = egCore.idl.toHash(circ, true);
+                        cp._circ_lib = circ.circ_lib();
+                        cp._duration = circ.duration();
+                    }
+                );
+
                 // create a label using just the unique part of the owner list
                 var index = 0;
                 var prev_owner_list;

commit d386d7c604d92b443e1698fb1efa5d6f5eb45627
Author: Remington Steed <rjs7 at calvin.edu>
Date:   Wed Nov 7 11:02:48 2018 -0500

    LP#1761222: Add four columns available in XUL client
    
    The XUL client had these columns but they hadn't been added to the web client
    yet. This commit adds them:
    
      - Classification
      - Due Date
      - OPAC visible?
      - Quality
    
    Signed-off-by: Remington Steed <rjs7 at calvin.edu>
    Signed-off-by: Bill Erickson <berickxx at gmail.com>
    Signed-off-by: Tiffany Little <tlittle at georgialibraries.org>
    Signed-off-by: Chris Sharp <csharp at georgialibraries.org>

diff --git a/Open-ILS/src/templates/staff/cat/catalog/t_holdings.tt2 b/Open-ILS/src/templates/staff/cat/catalog/t_holdings.tt2
index 128a590b40..3d827ddac5 100644
--- a/Open-ILS/src/templates/staff/cat/catalog/t_holdings.tt2
+++ b/Open-ILS/src/templates/staff/cat/catalog/t_holdings.tt2
@@ -138,6 +138,10 @@
     <eg-grid-field label="[% l('Fine Level') %]"              path="fine_level" hidden>
       <span>{{item['fine_level'] | string_pick:'[% l('Low') %]':'[% l('Normal') %]':'[% l('High') %]'}}</span>
     </eg-grid-field>
+    <eg-grid-field label="[% l('Classification') %]"          path="call_number.label_class.name" hidden></eg-grid-field>
+    <eg-grid-field label="[% l('Due Date') %]"                path="_circ.due_date" datecontext="_circ_lib" dateonlyinterval="_duration" datatype="timestamp" visible></eg-grid-field>
+    <eg-grid-field label="[% l('OPAC Visible?') %]"           datatype="bool" path="opac_visible" hidden></eg-grid-field>
+    <eg-grid-field label="[% l('Quality') %]"                 path="call_number.record.simple_record.quality" hidden></eg-grid-field>
   
   </eg-grid>
 </div>
diff --git a/Open-ILS/web/js/ui/default/staff/cat/services/holdings.js b/Open-ILS/web/js/ui/default/staff/cat/services/holdings.js
index 0354667143..78055cf402 100644
--- a/Open-ILS/web/js/ui/default/staff/cat/services/holdings.js
+++ b/Open-ILS/web/js/ui/default/staff/cat/services/holdings.js
@@ -16,7 +16,8 @@ function(egCore , $q) {
         flesh : 3,
         flesh_fields : {
             acp : ['status','location','circ_lib','parts','age_protect','copy_alerts', 'latest_inventory'],
-            acn : ['prefix','suffix','copies'],
+            acn : ['prefix','suffix','copies','label_class','record'],
+            bre : ['simple_record'],
             alci : ['inventory_workstation']
         }
     }
@@ -130,12 +131,26 @@ function(egCore , $q) {
                     }
                 );
 
-                // create virtual field for copy alert count
+                // create virtual fields for copy alert count and most recent circ
                 angular.forEach(svc.copies, function (cp) {
                     if (cp.copy_alerts) {
                         cp.copy_alert_count = cp.copy_alerts.filter(function(aca) { return aca.ack_time == null ;}).length;
                     }
                     else cp.copy_alert_count = 0;
+
+                    var copy_circ = egCore.pcrud.search('combcirc', { target_copy : cp.id },
+                        {
+                            order_by : {combcirc : 'xact_start desc'},
+                            limit :  1
+                        }
+                    ).then(function(copy_circ) {
+                        if (copy_circ) {
+                            cp._circ = egCore.idl.toHash(copy_circ, true);
+                            cp._circ_lib = copy_circ.circ_lib();
+                            cp._duration = copy_circ.duration();
+                        }
+                        return copy_circ;
+                    });
                 });
 
                 // create a label using just the unique part of the owner list

commit 56dfce3defcd77303ef59c29a982cfcc8c193e75
Author: Remington Steed <rjs7 at calvin.edu>
Date:   Tue Nov 6 11:17:33 2018 -0500

    LP#1761222: Add Fine Level, Loan Duration to Holdings View grid
    
    Signed-off-by: Remington Steed <rjs7 at calvin.edu>
    Signed-off-by: Bill Erickson <berickxx at gmail.com>
    Signed-off-by: Tiffany Little <tlittle at georgialibraries.org>
    Signed-off-by: Chris Sharp <csharp at georgialibraries.org>

diff --git a/Open-ILS/src/templates/staff/cat/catalog/t_holdings.tt2 b/Open-ILS/src/templates/staff/cat/catalog/t_holdings.tt2
index 2cddd413ef..128a590b40 100644
--- a/Open-ILS/src/templates/staff/cat/catalog/t_holdings.tt2
+++ b/Open-ILS/src/templates/staff/cat/catalog/t_holdings.tt2
@@ -132,6 +132,12 @@
     </eg-grid-field>
     <eg-grid-field label="[% l('Inventory Date') %]"          datatype="timestamp" path="latest_inventory.inventory_date"></eg-grid-field>
     <eg-grid-field label="[% l('Inventory Workstation') %]"   path="latest_inventory.inventory_workstation.name"></eg-grid-field>
+    <eg-grid-field label="[% l('Loan Duration') %]"           path="loan_duration" hidden>
+      <span>{{item['loan_duration'] | string_pick:'[% l('Short') %]':'[% l('Normal') %]':'[% l('Extended') %]'}}</span>
+    </eg-grid-field>
+    <eg-grid-field label="[% l('Fine Level') %]"              path="fine_level" hidden>
+      <span>{{item['fine_level'] | string_pick:'[% l('Low') %]':'[% l('Normal') %]':'[% l('High') %]'}}</span>
+    </eg-grid-field>
   
   </eg-grid>
 </div>
diff --git a/Open-ILS/web/js/ui/default/staff/cat/services/holdings.js b/Open-ILS/web/js/ui/default/staff/cat/services/holdings.js
index d78c049bc3..0354667143 100644
--- a/Open-ILS/web/js/ui/default/staff/cat/services/holdings.js
+++ b/Open-ILS/web/js/ui/default/staff/cat/services/holdings.js
@@ -436,4 +436,5 @@ function(egCore , $q) {
             }]
     }
 })
+.filter('string_pick', function() { return function(i){ return arguments[i] || ''; }; })
 ;

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

Summary of changes:
 .../src/templates/staff/cat/catalog/t_holdings.tt2 | 12 ++++++++++
 .../js/ui/default/staff/cat/services/holdings.js   | 27 ++++++++++++++++++++--
 2 files changed, 37 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list