[open-ils-commits] [GIT] Evergreen ILS branch master updated. 8f1b529f4df744d15a7bde48d560836cb37eff69

Evergreen Git git at git.evergreen-ils.org
Fri Dec 14 11:20:54 EST 2012


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  8f1b529f4df744d15a7bde48d560836cb37eff69 (commit)
      from  73c4ad8493995507919d1bcf62c38442d79c3225 (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 8f1b529f4df744d15a7bde48d560836cb37eff69
Author: Jason Etheridge <jason at esilibrary.com>
Date:   Wed Jun 20 11:47:54 2012 -0400

    lp1010187 eliminate redundant/unnecessary calls
    
    Particularly invocations of open-ils.circ.stat_cat.asset.retrieve.all in the
    Item Attribute Editor
    
    To test:
    
        login with a BR1 workstation
        load a pristine (non-stat-cat-laden) BR1 item with the editor
        there should be no call to open-ils.circ.stat_cat.asset.retrieve.all
        change the Circ Lib on the item to BR4
        reload the item in the editor
        there should be a call to open-ils.circ.stat_cat.asset.retrieve.all
        reload the item in the editor
        there should be no call to open-ils.circ.stat_cat.asset.retrieve.all
        assign the item a stat cat entry owned by CONS
        reload the item in the editor
        there should be no call to open-ils.circ.stat_cat.asset.retrieve.all
    
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>
    Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>

diff --git a/Open-ILS/xul/staff_client/server/cat/copy_editor.js b/Open-ILS/xul/staff_client/server/cat/copy_editor.js
index 3e701ec..6af09ce 100644
--- a/Open-ILS/xul/staff_client/server/cat/copy_editor.js
+++ b/Open-ILS/xul/staff_client/server/cat/copy_editor.js
@@ -1675,6 +1675,9 @@ g.populate_stat_cats = function() {
             var entries = g.copies[i].stat_cat_entries();
             if (!entries) entries = [];
             for (var j = 0; j < entries.length; j++) {
+                if (typeof g.data.hash.asc[ entries[j].stat_cat() ] != 'undefined') {
+                    continue; // We already have this stat cat, so assume we have everything we need for this lib
+                }
                 var lib = entries[j].owner(); if (typeof lib == 'object') lib = lib.id();
                 sc_libs[ lib ] = true;
             }
@@ -1685,6 +1688,9 @@ g.populate_stat_cats = function() {
         sc_libs = {};
         for (var i = 0; i < g.copies.length; i++) {
             var circ_lib = g.copies[i].circ_lib(); if (typeof circ_lib == 'object') circ_lib = circ_lib.id();
+            if (typeof g.data.hash.my_aou[ circ_lib ] != 'undefined') {
+                continue; // We should already have everything we need for this lib
+            }
             sc_libs[ circ_lib ] = true;
         }
         add_common_ancestors(sc_libs);
@@ -1703,6 +1709,9 @@ g.populate_stat_cats = function() {
                     }
                 }
                 var owning_lib = g.map_acn[ cn_id ].owning_lib(); if (typeof owning_lib == 'object') owning_lib = owning_lib.id();
+                if (typeof g.data.hash.my_aou[ owning_lib ] != 'undefined') {
+                    continue; // We should already have everything we need for this lib
+                }
                 sc_libs[ owning_lib ] = true;
             }
         }

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

Summary of changes:
 .../xul/staff_client/server/cat/copy_editor.js     |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list